Skip to main content

Getting Started

We recommend you use mopro-cli to create and maintain your application. Here's how you can get started with your example app in a few minutes.

You can also watch this short (~5m) tutorial.

Install dependencies

First, make sure you've installed the prerequisites.

Then, run the following commands:

# Clone the mopro repo
git clone https://github.com/zkmopro/mopro.git

# Go to your newly cloned checkout
cd mopro

# Install mopro-cli locally
(cd mopro-cli && cargo install --path .)

# Set `MOPRO_ROOT` (replace with path to your git checkout of mopro)
# For example: `export MOPRO_ROOT=/Users/user/repos/github.com/zkmopro/mopro`
export MOPRO_ROOT=$(PWD)

# Install `mopro` dependencies
mopro deps

Create a project

Create and initialize a project:

# Initialize a project
# This will create a new project in your current directory
mopro init --platforms ios android

# Go to your project folder
cd mopro-example-app

Configure mopro settings

You may adapt mopro-config.toml to your needs. For example, if you already have a Circom project you can use that.

Prepare your circuit artifacts:

mopro prepare

This only has to be done once when changing the circuit.

Build, test and run your project

Depending on what platforms you are targetting, you can run the following commands:

  • Build the project

    mopro build
  • Run end-to-end test (in Rust only)

    mopro test
  • Build the project for iOS

    mopro build --platforms ios
  • Open in Xcode to run on simulator

    open ios/ExampleApp/ExampleApp.xcworkspace

    Use command+U to run tests.

  • Build the project for Android

    mopro build --platforms android
  • Open in Android Studio to run on simulator

    open android -a Android\ Studio

    Use ^R (control+R) to execute a simulator.

See mopro-cli for more details on usage. Edit mopro configuration to build for device or build for other circuits.