Fix FRB generation during Flutter init#1053
Merged
Merged
Conversation
Install the FRB code generator in the Cursor Docker image and run it before building the Rust workspace during Flutter initialization. Also refresh the committed Dart bridge output and keep the Rust and Dart call sites compiling with the regenerated interface. Co-authored-by: Calcitem <calcitem@outlook.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




📜 Description
Install
flutter_rust_bridge_codegenin the Cursor Docker image and run FRB code generation before building the Rust workspace influtter-init.sh.Refresh the committed Dart FRB bridge output and update Rust/Dart call sites so the regenerated bridge compiles cleanly.
💡 Motivation and Context
Docker initialization was building the Rust workspace before
crates/tgf-frb/src/frb_generated.rsexisted, causingrust_lib_sanmillto fail withfile not found for module frb_generated.💚 How did you test it?
cargo install flutter_rust_bridge_codegen --version 2.12.0 --lockedbash ./flutter-init.sh./format.sh scargo build --workspacecargo build -p rust_lib_sanmillflutter test test/games/mill/native_mill_rules_port_ffi_test.dartwith a temporary Linux library symlink for the test's hard-coded.dllpath📝 Checklist
🔮 Next steps