diff --git a/README.md b/README.md index 957e973..19f282a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ cargo install cargo-ndk ### Cargokit -[Cargokit](https://github.com/irondash/cargokit) handles building, just `flutter run` it or run it in Android Studio or VS Code (untested). +[Cargokit](https://github.com/irondash/cargokit) builds and bundles the native Rust library (in `rust/`) for each platform, just `flutter run` it or run it in Android Studio or VS Code (untested). To update Cargokit in the future, use: ```sh @@ -32,7 +32,17 @@ git subtree pull --prefix cargokit https://github.com/irondash/cargokit.git main ## Development -To (re)generate Dart bindings run `just generate` +The Dart bindings in `lib/src/rust` are generated from the Rust API in `rust/` by [flutter_rust_bridge](https://github.com/fzyzcjy/flutter_rust_bridge). + +Install the codegen tool once, matching the `flutter_rust_bridge` version in `pubspec.yaml`: +```sh +cargo install flutter_rust_bridge_codegen --version 2.11.1 +``` + +Then, after changing the Rust API, regenerate the bindings with: +```sh +flutter_rust_bridge_codegen generate +``` ## Example app