Rantanen / intercom

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

Use traits to define attribute results to support arbitrary paths #131

Closed Rantanen closed 4 years ago

Rantanen commented 4 years ago

Attributes define many items, such as IID, virtual tables, etc. These items were previously defined as global items with unique names that could then be referenced by other attributes. This causes problems if the user wants to implement a trait from a different module as these global items would need to be use'd by the user to access them by name.

Moving all of those into traits that can be accessed through <dyn [trait] as OurInternalTraut>::Item allows accessing them without relying on global items.

True path support still needs handling the items through syn::Path instead of the current syn::Ident.