Comments (6)
I don't quite understand this report. We do have some tests which use external types, so it would be ideal if you can reproduce this problem in our https://github.com/mozilla/uniffi-rs/tree/main/fixtures/ext-types test - that will both help explain the report and give us the start of a test-case for any fix.
from uniffi-rs.
The gist of it is if package_name
or module_name
are set in the uniffi binding config file in library mode with proc macros does not generate working bindings.
When I have time I'll produce a pull request with an example case.
from uniffi-rs.
I have pushed and example to my fork.
Generate the bindings with library mode in the lib_main
crate
cargo build
uniffi-bindgen generate --library ../../../target/debug/liblib_main.so --config uniffi.toml --language swift --out-dir ./tmp/swift
uniffi-bindgen generate --library ../../../target/debug/liblib_main.so --config uniffi.toml --language kotlin --out-dir ./tmp/kotlin
Observe that the swift bindings do not have any of the exported types and that the kotlin code has compilation issues.
from uniffi-rs.
Your fork adds new crates and no tests - you will find all these types already exist in that ext-types fixture and it has tests. It's likely your uniffi.toml configs aren't quite correct, but you will need to be a little more concrete with the exact problem for us to help.
from uniffi-rs.
(eg,
is a custom type imported into another crate)from uniffi-rs.
Thanks for that, I am a bit busy this week, but I will try to adapt that example next week,
from uniffi-rs.
Related Issues (20)
- Custom Types from external crate do not generate correct binding function signature when used in exports HOT 8
- Traitโs associated types support HOT 5
- Errors declared in external crate can't be thrown. HOT 1
- Can the internal `FFIConverter*` types be hidden? HOT 2
- Documented attribute macro `uniffi::method` is missing HOT 2
- enum/error types are ambiguous HOT 10
- Instantiating AndroidSystemCleaner causes crash on Android 13
- `Lift` / `LiftRef` error with bad compilation error for large enums HOT 3
- Is it possible to expose PartialEq, Eq, Hash and other traits? HOT 5
- UniFFI generated Swift code fails to compile "Swift 6" mode - due to mutation of shared state.
- uniffi-rs 0.27 throw error with Constructor return type must be Arc<Self> HOT 20
- [tests]: error: consecutive declarations on a line must be separated by ';' HOT 5
- v0.27.0 regression of `uniffi-bindgen generate` HOT 4
- Syntax issues with the generated binding code in Swift HOT 5
- [User Guide] Make Tutorial section self-contained and self-explanatory HOT 1
- Conditional Compilation Error in Kotlin Bindings for Rust Enum with message Field
- Python type aliases don't use forward references HOT 9
- Equality operator for `Object` in Python HOT 2
- Custom type names aren't treated as real type names. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uniffi-rs.