Rantanen / intercom

Object based cross-language FFI for Rust
MIT License
63 stars 7 forks source link

Restructured intercom-common in preparation of a new "com_struct" attribute #73

Closed Fluxie closed 5 years ago

Fluxie commented 6 years ago

"com_struct" attribute will be used to mark Rust structs that are accepted as parameters in COM interface methods.

codecov-io commented 6 years ago

Codecov Report

Merging #73 into master will increase coverage by 0.02%. The diff coverage is 89.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   74.53%   74.55%   +0.02%     
==========================================
  Files          56       61       +5     
  Lines        3436     3439       +3     
==========================================
+ Hits         2561     2564       +3     
  Misses        875      875
Impacted Files Coverage Δ
intercom-common/src/attributes/com_library.rs 0% <ø> (ø) :arrow_up:
intercom-common/src/model/common.rs 0% <0%> (ø)
intercom/src/error.rs 13.15% <0%> (ø) :arrow_up:
intercom-common/src/builtin_model.rs 91.3% <100%> (ø) :arrow_up:
intercom/src/combox.rs 84.93% <100%> (ø) :arrow_up:
intercom-common/src/attributes/com_class.rs 100% <100%> (ø) :arrow_up:
intercom-common/src/model/com_crate.rs 87.11% <87.11%> (ø)
intercom-common/src/model/com_impl.rs 90.56% <90.56%> (ø)
intercom-common/src/model/com_interface.rs 91.45% <91.45%> (ø)
intercom-common/src/model/com_class.rs 91.78% <91.78%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d988017...740c60e. Read the comment docs.

Rantanen commented 6 years ago

Was this still pending the Built-in changes we discussed on IRC?

Removing the inject_built_in and injecting those automatically.

Rantanen commented 6 years ago

Syn 0.14 upgrade resulted in conflicts here.

The changes in model.rs should be mostly limited to

The TokenStream, Span, etc. are easiest to use by including the use prelude::*. Given things like the TokenStream might change later when proc macros go stable and instead of proc_macro2::TokenStream we'll start using proc_macro::TokenStream, I figured defining these in a single place was more convenient.

Rantanen commented 5 years ago

Most of the changes from this MR were integrated into the type system MR. Thanks for those!

The one change that still remains is the com_struct <-> com_class name change.