зеркало из https://github.com/mozilla/uniffi-rs.git
f0041800c4
Moved the FfiConverter implementation for callback interfaces and traits from a declarative macro in `uniffi_core` to a proc-macro in `uniffi_macros`. This offers better `UniFfiTag` handling. Now `FfiConverter` is implemented for all tags for callback interfaces/traits that are wrapped with the proc-macro attributes. This matches the behavior for other types and will help fix #1531. Changed the object FfiConverter to be inside a proc-macro, rather than using the `Interface` trait. This more flexibility and avoids conflicting impls. For example, this allows for both the objects and trait interface `FfiConverters`s to be implemented on `Arc<T>`. I also think it's nicer with less indirection. One drawback is that libraries can't implement `FfiConverter` on Arc<T> because of the orphan rules. To get around this, I added the `FfiConverterArc` trait. Other changes: - Adding `module_path` to the user type metadata - Added an proc-macro -> proc-macro external type test by copying the ext-types fixture into another one that uses proc macros. |
||
---|---|---|
.. | ||
src | ||
tests/ui | ||
Cargo.toml | ||
release.toml |