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)
- Expose panic line numbers in logcat
- Kotlin bug: enum with associated value being `Arc<Object>` generates non compiling Kotlin code (UniFFI 0.27.1) HOT 1
- Clarify `check_library_path` semantics HOT 2
- DISCUSS: Proc macro / UDL for Swift property wrappers and macro annotations HOT 6
- Issues while importing and using a created swiftmodule HOT 5
- Incorrect comments in RustBuffer about being limited to i32
- how to send Rust opaque type to Kotlin HOT 5
- Online docs have no language syntax highlighting HOT 1
- RustBuffer regression with nested Errors HOT 5
- Swift errors don't provide `localizedDescription` HOT 6
- Generating FFI bindings for dependent crates into one single Swift / Kotlin file? HOT 4
- External type fails for some corner cases HOT 1
- Config feature and Export macros don't get along HOT 1
- iOS Framework Expected in: /usr/lib/libc++.1.dylib HOT 2
- Remote interface types
- Updating from 0.25.3 to 0.26.x or 0.27.x fails for interface HOT 8
- Java 8 deprecation is unexpected
- #[doc = ...] fails to parse with uniffi attribute macros HOT 1
- update docs/diplomat-and-macros.md
- Crates.io shows 0.27.2 but the associated tag doesn't exist HOT 3
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.