iroh_android/README.md
2025-07-07 21:20:53 -04:00

34 lines
1.3 KiB
Markdown

Iroh Sync Mobile Client
This guide provides the necessary steps to build and run the application on Android from a Windows development environment.
Prerequisites
Before you begin, ensure you have the following installed and available in your system's PATH:
Flutter SDK: Installation Guide
Rust Toolchain: Installation Guide (includes rustup, cargo, and rustc)
1. Install Bridge Code Generator
The project requires a command-line tool to connect the Rust and Dart code. Install it globally using cargo:
cargo install flutter_rust_bridge_codegen
2. Build and Run the Application
Follow these steps in order from the root directory of the project.
A. Get Flutter Dependencies:
This command downloads all the required Dart packages specified in pubspec.yaml.
flutter pub get
B. Generate the Rust-Dart Bridge:
This command reads the Rust source code and generates the necessary Dart "glue" code.
flutter_rust_bridge_codegen generate
C. Run the App:
Connect an Android device (with USB Debugging enabled) or start an Android emulator. Then, run the following command to compile the entire project, install it, and launch it on your device.
flutter run
Note: The first build can take several minutes as it needs to compile the Rust library for the first time. Subsequent builds will be much faster.