Skip to main content

zkVM Quick Start

Welcome to the zkVM Quick Start page! Here are the steps between you and your first proof:

  1. Install the RISC Zero toolchain.
  2. Initalize a new project using the cargo risczero tool.
  3. Edit the boilerplate to build your first project.
  4. Run your project locally or with Bonsai.

1. Install the RISC Zero Toolchain

First, install Rust if you don't already have it.

Next, install the cargo-risczero tool and install the toolchain with:

cargo install cargo-risczero
cargo risczero install

2. Initialize a New Project

Once you've installed the toolchain, you can initialize a new project using the starter template by running:

cargo risczero new my_project

See the cargo risczero docs for other options for initialization.

3. Edit the boilerplate to build your first project

In the codebase for your new project, you'll find a handful of places marked TODO, where you'll need to make some changes in order to build your first project.

Don't worry -- each TODO comes with instructions for what you need to do, and the Hello World tutorial contains step-by-step instructions.

4. Run your project, locally or remotely

The readme for your project includes instructions for how to run it, both locally or remotely. You can build your example and run the prover locally with:

cargo run --release

That's all it takes to build and run a minimal RISC Zero application.

Local & Remote Proving

You can build and run your zkVM applications using your own hardware, or you can upload your guest program to Bonsai and make requests for proof generation as needed.

Local Proving

To run the zkVM on your own machine, we recommend at least 16GB of RAM. The readme files on the zkVM demo applications show cargo commands for local proof generation.

Remote Proving

To run the zkVM remotely using Bonsai, request access and set the environment variables BONSAI_API_KEY=<YOUR_API_KEY> and BONSAI_API_URL=<BONSAI_URL>. Additional information is available in the starter template

Other options

Options such as GPU acceleration and skipping the proof generation are documented in the feature flags.