-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to automatically generate include 3rd party sdk (matrix-sdk) #2486
Comments
Hi! Thanks for opening your first issue here! 😄 |
Hmm, briefly checked the matrix-sdk crate, looks like it contains a lot of advanced syntax such as closure with async types. Thus I guess frb will not be able to fully automatically translate such complex packages yet. At the same time, you can always manually do the glueing https://cjycode.com/flutter_rust_bridge/guides/third-party/manual. |
So we need to manually mark all the methods in our main crates with like |
Just playing around with frb to know how it works and found after marking a struct as non_opaque also getting issue while generating code and if the struct is marked as opaque no issue
|
For this error - hmm is it possible you have a struct named Server somewhere else in your repo? |
To make sure the name is unique , changed it to Server54325 but still same error
|
@fzyzcjy When the trait impl of ServerCore is removed it's generating properly. is there any chance if a struct has both impl and trait impl . Then it would case issue ? |
Hmm I guess that may be a bug. Could you please try to make a more minimal reproducible sample? For example,
|
Describe the bug
After running
Steps to reproduce
flutter_rust_bridge_codegen integrate
then manually including the 3rd Party library and updated rust_root in flutter_rust_bridge.yaml[lib] crate-type = ["cdylib", "staticlib"]
[dependencies] flutter_rust_bridge = "=2.7.0"
RUST_LOG=debug flutter_rust_bridge_codegen -v generate --stop-on-error
issue occurs
Logs
Expected behavior
No response
Generated binding code
No response
OS
MacOS
Version of
flutter_rust_bridge_codegen
2.7.0
Flutter info
Version of
clang++
No response
Additional context
Also a side note , no steps in flutter_rust_bridge doc says to added below on rust project , maybe this is basic but if it's in doc then it will be useful .
Also if we #[frb(ignore)] on issue method or struct it would leads to add on many other struct & methods other depends on it
Can you please give suggestions or solution to this
[lib] crate-type = ["cdylib", "staticlib"]
[dependencies] flutter_rust_bridge = "=2.7.0"
The text was updated successfully, but these errors were encountered: