uniffi-rs
c4963ecc - Record metadata for a struct implementing a trait. (#2204)

Commit
1 year ago
Record metadata for a struct implementing a trait. (#2204) ``` #[uniffi::export] impl MyTrait for MyObject { ... } ``` Previously worked as it ignored `MyTrait`. This adds new metadata to record it, allowing foreign bindings to implement things like inheritance. Includes Python generating an inheritance chain to reflect this relationship. This will not generate correct code if a struct declares more than 1 trait, and there's some undesirable re-wrapping when traits from these objects gets passed back and forward, but seems to work surprisingly well. Fixes #2196.
Author
Parents
Loading