flutter_rust_bridge is a toolchain that generates ergonomic bindings between Rust and Dart/Flutter so you can write performance-critical logic in Rust while building UI in Flutter. It abstracts away the low-level FFI details, letting developers define Rust functions and data structures that are safely callable from Dart. The project supports passing complex types, handling async operations and streams, and integrating with Flutter across mobile and desktop targets. By leaning on Rust’s memory safety and zero-cost abstractions, it enables compute-heavy tasks—parsing, crypto, image/audio processing, and more—without sacrificing Flutter’s developer experience. Build scripts and templates streamline packaging and distribution so the Rust side fits cleanly into CI and multi-platform releases. In practice, teams gain a maintainable way to share one performant Rust core across multiple Flutter apps while keeping the UI reactive and fast.
Features
- Rapid setup: Only a one-liner command to integrate into your project
- Arbitrary types: Use arbitrary Rust and Dart types without manual intervention, even if they are not serializable or non-clone (previously need some manual intervention)
- Async Rust: Support asynchronous Rust (async fn), in addition to sync Rust / async Dart / sync Dart
- Rust call Dart: Allow Rust to call Dart functions (previously only allow Dart to call Rust)
- Support whole folders as inputs: Previously only support one single file (e.g. api.rs)
- Use libraries/tools in Flutter/Rust: All existing libraries, Flutter debuggers, ... Nothing to stop you from using them