Setup
Stack
- Languages: Dart, Rust, C++ (Windows, Linux), Swift (macOS)
- Dart <-> Rust glue: flutter_rust_bridge
- UI: Flutter
- Webcam: Nokhwa
- Printing: Printing
- Logging: Talker
- Data classes: Freezed
- Firefox Send client: ffsend-api
- JPEG decoding: zune-jpeg, encoding: jpeg-encoder
Requirements
For all languages, frameworks and tools, we support the latest versions.
For all platforms
-
flutter_rust_bridge_codegen-
Install using Cargo:
cargo install flutter_rust_bridge_codegen --version 2.11.1
-
-
Flutter SDK 3.41.0+
- Be sure that the
fluttercommand is available globally asflutter_rust_bridge_codegenneeds it.
This is especially important when using Flutter SDK managers likeasdforfvm
- Be sure that the
-
Optional: For building the documentation mdBook and some extensions for mdBook are needed
-
Install using Cargo:
cargo install mdbook mdbook-mermaid
-
-
Be sure to read the docs for troubleshooting and workarounds
On Windows
- Visual Studio 2026 Build Tools
- Optional: full Visual Studio 2026 installation
- Select Desktop development with C++ under the Workloads tab
- Under installation details on the right panel, select the MSVC Build Tools, Windows 11 SDK, and C++ ATL (needed for Flutter secure storage plugin)
- Rust
- Recommended installation via
rustupto keep components up to date - Use default options (MSVC host, target, and toolchain)
- Recommended installation via
- MSYS2
-
Follow the instructions on the MSYS2 website
-
Install the following packages:
mingw-w64-clang-x86_64-pkgconf mingw-w64-clang-x86_64-libgphoto2 mingw-w64-clang-x86_64-curl-winssl mingw-w64-clang-x86_64-nghttp2 mingw-w64-clang-x86_64-nghttp3 -
Make sure
{MSYS_INSTALL_PATH}\clang64\binis in yourPATH(before other folders that also providepkg-config/pkgconf)
-
On macOS
- Xcode
- Installing from the App Store is recommended (automatic updates)
- Rust (
aarch64-apple-darwinorx86_64-apple-darwin, depending on your architecture) - Homebrew
-
Install with
pkgconf libgphoto2
-
On Linux
-
System packages
- See the Flutter documentation for a list of required packages
- Note: the installation command provided by Flutter may only work on Ubuntu — check your distro’s package names
-
Additional packages
llvm libssl-dev libdigest-sha-perl libcurl4-openssl-dev libasound2-dev -
Rust (
x86_64-unknown-linux-gnuoraarch64-unknown-linux-gnu, depending on your architecture)- Recommended installation via
rustup
- Recommended installation via
Build steps
Using just (recommended)
Please note: This method expects global fvm to be available and just.
- Run
justfrom the root folder of the repository - Run
flutter runor use your IDE to run the application
Manually
Please note: Run all commands from the root folder of the repository, unless mentioned otherwise.
-
Generate translation files.
flutter gen-l10n -
Generate Rust <-> Dart code
flutter_rust_bridge_codegen generate- Note: Make sure to re-run this command if you changed anything in the Rust subproject.
-
Generate Dart helper code
dart run build_runner build -
Build and run the app with
flutter runor use your IDE to run the application- Note: This will automatically build the Rust subproject before building the Flutter project, so no need to worry about that!
Developing tips
When to re-run build steps
- If you have changed any code in the Dart or Rust project that could change the generated bridging code, you should re-run the
flutter_rust_bridge_codegen generateorjust gen-bridgecommand- You can also run
flutter_rust_bridge_codegen generate --watchorjust watch-bridgeto automatically regenerate the bridging code when you save a file - You might need to run
dart run build_runner build --delete-conflicting-outputsorjust gen-code
- You can also run
- If you have changed any code related to JSON or TOML serialization, or MobX, you should re-run the
dart run build_runner build --delete-conflicting-outputsorjust gen-codecommand- You can also run
dart run build_runner watch --delete-conflicting-outputsorjust watch-codeto automatically regenerate the code when you save a file
- You can also run
- If you have changed any code related to the localization, you should re-run the
flutter gen-l10nofjust gen-l10ncommand
Adding a new screen using the VS Code extension Template
- Make sure to have the Template extension installed
- Right click the
viewsfolder in VS Code Explorer - Click Template: Create New (with rename), pick the
viewtemplate - Pick a name, enter it in
{snake_case}_screenformat (e.g.settings_screenoremail_photo_screen), press Enter - Your new view should be available!