Skip to content

Fix FRB generation during Flutter init#1053

Merged
calcitem merged 1 commit into
nextfrom
cursor/fix-frb-docker-init-96f8
May 2, 2026
Merged

Fix FRB generation during Flutter init#1053
calcitem merged 1 commit into
nextfrom
cursor/fix-frb-docker-init-96f8

Conversation

@calcitem
Copy link
Copy Markdown
Owner

@calcitem calcitem commented May 2, 2026

📜 Description

Install flutter_rust_bridge_codegen in the Cursor Docker image and run FRB code generation before building the Rust workspace in flutter-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.rs existed, causing rust_lib_sanmill to fail with file not found for module frb_generated.

💚 How did you test it?

  • cargo install flutter_rust_bridge_codegen --version 2.12.0 --locked
  • bash ./flutter-init.sh
  • ./format.sh s
  • cargo build --workspace
  • cargo build -p rust_lib_sanmill
  • flutter test test/games/mill/native_mill_rules_port_ffi_test.dart with a temporary Linux library symlink for the test's hard-coded .dll path

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Open in Web Open in Cursor 

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>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 2, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@calcitem calcitem marked this pull request as ready for review May 2, 2026 13:05
@calcitem calcitem merged commit 34c425c into next May 2, 2026
5 of 14 checks passed
@calcitem calcitem deleted the cursor/fix-frb-docker-init-96f8 branch May 2, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants