A React Native app using Expo using Cairo M to generate zero-knowledge proofs on mobile.
- Setup Rust
# Android
rustup target add aarch64-linux-android
cargo install cargo-ndk
# iOS
rustup target add aarch64-apple-ios
rustup target add aarch64-apple-ios-sim- Clone the repository
git clone https://github.com/kkrt-labs/cairo-mobile.git
cd cairo-mobile- Install dependencies
npm install- Prebuild the native Android & iOS directories
npx expo prebuild --clean-
Generate Native Bindings: This step compiles the Rust code in
cairo-m/and prepares the native modules (cairo-m-bindings).⚠️ Runningnpm run generate-bindingswill generate ios bindings simulator, not for device. For ios devices, runnode scripts/setup_rust_bindings.mjs --ios-devicenpm run generate-bindings # or specifically: # node scripts/setup_rust_bindings.mjs --all
You'll need to re-run this command whenever you make changes to the Rust code in
cairo-m/folder. -
Run the app
- Android: Run on Android device if connected, fallbacks to Android
Simulator
npx expo run:android
- iOS
npx expo run:ios # Run on iOS Simulator npx expo run:ios --device # Run on iOS device