`flutter-rust-app-template`: Flutter at the front, Rust at the back

Check out https://github.com/cunarist/flutter-rust-app-template

Simply duplicating the repo is enough to start one's own project. You can write down your code in Dart and Rust without worrying about the connection between them.

I first tried to make an app with Flutter and Rust using `flutter_rust_bridge`, but the procedure to get the project work was very complicated even with the detailed docs. Therefore I thought a dedicated template with continuous updates would be needed.

This template is primarily built using the flutter_rust_bridge library. It also incorporates several popular packages and modifications into the default Flutter template, ensuring optimal development process. It has been designed with future scalability and performance in mind.

Extra features added to the default Flutter template are:

  • Rust integration with the ability to use an arbitrary number of library crates
  • MVVM pattern with easy viewmodel binding from Dart and viewmodel update from Rust
  • Restarting Rust logic on Dart's hot restart
  • Convenient project management using Python
  • Managing windows on desktop platforms
  • Writing user interface texts in the translation file

Platform Support

Structuring a Flutter project that targets multiple platforms can be a challenging task, especially when incorporating Rust. With this template, you don't have to start from scratch or face the added complexity of integrating Rust.

  • :white_check_mark: Windows: Tested and supported
  • :white_check_mark: Linux: Tested and supported
  • :white_check_mark: Android: Tested and supported
  • :white_check_mark: macOS: Tested and supported
  • :white_check_mark: iOS: Tested and supported
  • :pause_button: Web: Not supported but will be in the future

:brick: Project Structure

Flutter deals with the cross-platform user interface while Rust handles the business logic. The front-end and back-end are completely separated, which means that Dart code and Rust code should be detachable from each other. These two worlds communicate through channels.

Moreover, you can conveniently receive the latest commits from flutter-rust-app-template into your repository using the provided Python script.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.