This repo automatically deploys the output of a build of main
to GH pages
Access it here: https://collindietz.github.io/flutter_rust_bridge_template_enhanced/
Most commands are defined in the justfile. To run locally just run just run_web
and open http://localhost:8080/ in your fave browser. You can open the page in a browser by running just open_<browser>
.
Support status for browsers is as follows | Browser | Supported? |
---|---|---|
Chrome | ✅ | |
Safari | ✅ | |
Firefox | ✅ |
To run locally for desktop run just run_<OS>
.
Support status for OS's is as follows
Browser | Supported? |
---|---|
MacOS (intel) | ✅ |
MacOs (M1) | ❔ |
Windows | ❔ |
Linux | ❔ |
Old readme (everything past here is from the source project)
This repository serves as a template for Flutter projects calling into native Rust
libraries via flutter_rust_bridge
.
To begin, ensure that you have a working installation of the following items:
flutter_rust_bridge_codegen
cargo packagegradle.properties
, e.g.:echo "ANDROID_NDK=.." >> ~/.gradle/gradle.properties
Then go ahead and run flutter run
(for web, run dart run flutter_rust_bridge:serve
instead). When you're ready, refer to our documentation
here to learn how to write and use binding code.
Once you have edited api.rs
to incorporate your own Rust code, the bridge files bridge_definitions.dart
and bridge_generated.dart
are generated using the following command (note: append --wasm
to add web support):
flutter_rust_bridge_codegen --rust-input native\src\api.rs --dart-output .\lib\bridge_generated.dart --dart-decl-output .\lib\bridge_definitions.dart
flutter_rust_bridge_codegen --rust-input native/src/api.rs --dart-output ./lib/bridge_generated.dart --dart-decl-output ./lib/bridge_definitions.dart
If you would like to generate boilerplate for using flutter_rust_bridge
in your existing projects,
check out the flutter_rust_bridge
brick
for more details.
This template is not affiliated with flutter_rust_bridge. Please file issues and PRs related to the template here, not flutter_rust_bridge.
Copyright 2022 Viet Dinh.
This template is licensed under either of
at your option.
The SPDX license identifier for this project is MIT OR Apache-2.0
.