| name | usernode-frb-codegen |
| description | Run Usernode Flutter Rust Bridge codegen with the matching upstream flutter_rust_bridge revision. Use when Rust APIs or FRB bindings change. |
Usernode FRB Codegen
Run Flutter Rust Bridge generation against the ../usernode checkout.
Workflow
-
Pull latest usernode:
cd ../usernode && git pull
-
Extract the flutter_rust_bridge rev from ../usernode/crates/usernode/Cargo.toml.
-
Check whether installed codegen already matches:
cargo install --list | grep -A1 '^flutter_rust_bridge_codegen' | head -2
If it clearly contains the target rev, skip reinstalling.
-
Install only if needed:
cargo install flutter_rust_bridge_codegen --git https://github.com/Usernode-Labs/flutter_rust_bridge --rev <HASH> --force
-
Verify:
flutter_rust_bridge_codegen --version
-
Generate from the flutter-mobile-app root:
flutter_rust_bridge_codegen generate
-
If sibling worktrees need reseeding, offer a dry run first:
for wt in $(git worktree list --porcelain | awk '/^worktree/ {print $2}' | tail -n +2); do
if git -C "$wt" status --short -- lib/src/rust | grep -q .; then
echo "SKIP dirty rust bindings in $wt"
continue
fi
rsync -a --dry-run --itemize-changes lib/src/rust/ "$wt/lib/src/rust/"
done
After the user reviews the dry-run output, rerun only the approved clean
targets without --dry-run. Do not use --delete unless the user explicitly
confirms it for each target worktree.
Report the FRB rev, whether install was skipped, generation status, and any worktree reseed.