Sitelet https://246ba58b.mopro.pages.dev/docs/0.0.1/getting-started/
Skip to main content
Version: 0.0.1

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:

  1. Clone the mopro repo
git clone --branch v0.0.1 https://github.com/zkmopro/mopro.git
  1. Go to your newly cloned checkout
cd mopro
  1. Install mopro-cli locally
(cd mopro-cli && cargo install --path .)
  1. Set MOPRO_ROOT (replace with path to your git checkout of mopro)
export MOPRO_ROOT=$(PWD)
  1. Install mopro dependencies
mopro deps

Create a project​

Create and initialize a project:

  1. Initialize a project This will create a new project in your current directory
mopro init --platforms ios android
  1. 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 targeting, you can run the following commands:

  • Build the project

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

    mopro test

iOS​

  • 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.

Android​

  • 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.