-
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
Issue with flutter_rust_bridge_codegen after updating Rust code #2462
Comments
Hi! Thanks for opening your first issue here! 😄 |
You are welcome and thanks for the praise!
Hmm, maybe try to use flutter_rust_bridge.yaml to configure everything (instead of using command line), and see whether it works |
Close since inactivity, and suggestions are made above, but feel free to ping me if there are any questions! |
Ah, sorry about that! I forgot to respond. Yeah, it seems to be working now. Thanks! |
You are welcome! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue. |
Describe the bug
First, I would like to express my appreciation for all the work you and the team have put into flutter_rust_bridge. I’m excited about the direction this project is heading and the possibilities it opens up for seamless integration between Rust and Flutter.
Issue Description:
I am encountering an error when running flutter_rust_bridge_codegen generate after making changes to my Rust code. Despite following the recommended crate-based syntax (e.g., using --rust-input crate:: and --rust-root), the code generator fails to produce the expected output. I have also attempted to remove any stale generated files (e.g., frb_generated.rs) and re-run the code generation with various configurations, but the issue persists.
Steps to reproduce
flutter_rust_bridge_codegen generate
--rust-root rust
--rust-input crate::
--dart-output lib/src/rust/frb_generated.dart
--rust-output rust/src/frb_generated.rs
--watch
After making changes to the Rust functions, the code generator either fails with a “prefix not found” error or does not properly generate the updated bindings. The output would look like this:
Error: When compute_mod_from_rust_path(code_path="C:\Users\joett\code\projects\SyncUp\app\rust/src/frb_generated.rs", base_dir=
"\\?\C:\Users\joett\code\projects\SyncUp\app\rust\src")
Caused by:
prefix not found
Logs
Expected behavior
Updated Dart and Rust bindings should be regenerated after modifying and saving changes to Rust files, enabling me to run flutter run and see the updated functionality in the Flutter app.
Generated binding code
OS
Windows
Version of
flutter_rust_bridge_codegen
2.7.0
Flutter info
Version of
clang++
No response
Additional context
If there is any additional information I can provide, such as a minimal reproducible example, logs, or directory listings, please let me know. I’m grateful for your hard work on this project and look forward to any guidance you can offer to resolve this issue.
Thank you for your time and support!
The text was updated successfully, but these errors were encountered: