mirror of
https://github.com/ALEZ-DEV/Babylonia-terminal.git
synced 2025-12-16 17:38:51 +00:00
45 lines
1.1 KiB
Markdown
45 lines
1.1 KiB
Markdown
|
|
|
|
## Using Rust Inside Flutter
|
|
|
|
This project leverages Flutter for GUI and Rust for the backend logic,
|
|
utilizing the capabilities of the
|
|
[Rinf](https://pub.dev/packages/rinf) framework.
|
|
|
|
To run and build this app, you need to have
|
|
[Flutter SDK](https://docs.flutter.dev/get-started/install)
|
|
and [Rust toolchain](https://www.rust-lang.org/tools/install)
|
|
installed on your system.
|
|
You can check that your system is ready with the commands below.
|
|
Note that all the Flutter subcomponents should be installed.
|
|
|
|
```bash
|
|
rustc --version
|
|
flutter doctor
|
|
```
|
|
|
|
You also need to have the CLI tool for Rinf ready.
|
|
|
|
```bash
|
|
cargo install rinf
|
|
```
|
|
|
|
Messages sent between Dart and Rust are implemented using Protobuf.
|
|
If you have newly cloned the project repository
|
|
or made changes to the `.proto` files in the `./messages` directory,
|
|
run the following command:
|
|
|
|
```bash
|
|
rinf message
|
|
```
|
|
|
|
Now you can run and build this app just like any other Flutter projects.
|
|
|
|
```bash
|
|
flutter run
|
|
```
|
|
|
|
For detailed instructions on writing Rust and Flutter together,
|
|
please refer to Rinf's [documentation](https://rinf.cunarist.com).
|
|
|