Minimal Flutter template for RISC0 zkVM proof generation and verification on mobile devices using Mopro.
Note
For ECDSA (p256) example, please check https://github.com/moven0831/mopro-r0-ecdsa-app
├── risc0-circuit/ # RISC0 zkVM circuit and host code
│ ├── src/main.rs # Host program (proof generation)
│ └── methods/guest/ # Guest program (runs in zkVM)
├── mopro-r0-example-app/ # Mopro FFI bindings
│ ├── src/lib.rs # UniFFI exports for mobile
│ └── flutter/ # Flutter app (cross platforms)
└── Cargo.toml # Rust workspace configuration
Mopro Risc0 Example App demo running live on Pixel 10 Pro.
Install required tools:
# Install the latest Mopro CLI
git clone [email protected]:zkmopro/mopro.git
cd cli && cargo install --path .
# Install Flutter SDK
# See: https://flutter.dev/docs/get-started/install
# Verify installation
mopro --version
flutter --version- Clone and setup:
git clone [email protected]:zkmopro/mopro-r0-example-app.git
cd mopro-r0-example-app/mopro-r0-example-app- Build native bindings:
mopro build- Update bindings:
mopro update- Run Flutter app:
cd flutter
flutter pub get
flutter run
# Run `flutter emulator` to check available one if you want to run on PC firstCurrently the risc0 is basic template. You can write your risc0 program in risc0-circuit/. More more examples, please refers to risc0/examples.
risc0-circuit/: Contains a risc0 program
src/main.rs: Host code that generates proofsmethods/guest/src/main.rs: Guest code that runs inside zkVM
# Run RISC0 host program directly
cd risc0-circuit && cargo run
# Run with execution logs
RUST_LOG="[executor]=info" RISC0_DEV_MODE=1 cargo runFor customizing your risc0 program with Mopro, you can refer to Mopro Docs.
mopro-r0-example-app/: FFI bindings and mobile integration
src/lib.rs: Exported functions for mobile appsflutter/: Flutter template
# Run tests
cargo test # Rust tests
# Rebuild after Rust changes
mopro build && mopro updateThis work is highly inspired by https://github.com/ElusAegis/MobiScale

