Mopro FFI
What is MoPro?
MoPro stands for Mobile Prover — a framework designed to simplify the development of client-side zero-knowledge (ZK) proof systems on mobile platforms.
MoPro FFI is a core component of this framework. It generates platform-specific bindings from Rust code, originally using UniFFI to support Swift (iOS) and Kotlin (Android). MoPro FFI abstracts away the complexity of UniFFI setup, as well as integration with Xcode and Android Studio. It provides ready-to-use frameworks and packages that you can simply drag and drop into your Xcode or Android Studio project.
Looking ahead, MoPro FFI will support additional FFI tools such as wasm-bindgen, flutter_rust_bridge, and more — eliminating the need for developers to configure each tool manually.
To get the most out of MoPro FFI, we recommend using the companion tool mopro-cli. It offers:
- Built-in support for various ZK proof systems (e.g., Circom, Halo2, Noir)
- Project templates for platforms like Xcode, Android Studio, React Native, Flutter, and the Web
With MoPro CLI, you can scaffold and build a privacy-preserving mobile app in minutes.
👉 Visit zkmopro.org to learn more about using MoPro and MoPro FFI.
Usage
We recommend using mopro-cli to generate project templates for a smoother experience.
However, you can also use the mopro-ffi package directly to generate bindings by following the setup instructions below. You can also refer to Rust Setup for more details.
Install mopro-ffi through cargo add mopro-ffi or add mopro-ffi in Cargo.toml
[]
= "0.3.0"
Define the crate-type for the UniFFI build process configuration.
[]
= ["lib", "cdylib", "staticlib"]
iOS
Create a file src/bin/ios.rs in your rust project
Execute the process using the defined binaries. For example
CONFIGURATION=release IOS_ARCHS=aarch64-apple-ios,aarch64-apple-ios-sim
It will generate bindings for the function you defined with #[uniffi::export]. Please checkout UniFFI | Procedural Macros: Attributes and Derives for more details.
Android
Create a file src/bin/android.rs in your rust project
Execute the process using the defined binaries. For example
CONFIGURATION=release ANDROID_ARCHS=x86_64-linux-android
It will generate bindings for the function you defined with #[uniffi::export]. Please checkout UniFFI | Procedural Macros: Attributes and Derives for more details.
Integration
- To integrate the generated bindings into your mobile development project, please refer to the appropriate platform-specific setup guides:
Community
- X account:
- Telegram group:
- Mopro Documentation: https://zkmopro.org
Acknowledgements
This work was initially sponsored by a joint grant from PSE and 0xPARC. It is currently incubated by PSE.