### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/0.21/zkvm/quickstart Installs the necessary RISC Zero toolchain components, including `cargo-binstall` and `cargo-risczero`, which are essential for building and managing zkVM projects. ```Shell cargo install cargo-binstall cargo binstall cargo-risczero cargo risczero install ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/1.2/zkvm/quickstart Installs the RISC Zero toolchain, including `rzup` and `cargo-risczero`, which are essential for developing zkVM applications. This involves downloading and executing an installation script. ```Shell curl -L https://risczero.com/install | bash ``` ```Shell rzup install ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/1.0/zkvm/quickstart Installs the RISC Zero toolchain and the `cargo-risczero` tool using a curl command. It also shows how to install a specific version using `rzup --version `. ```Shell curl -L https://risczero.com/install | bash ``` ```Shell rzup ``` ```Shell rzup --version ``` -------------------------------- ### Run RISC Zero Example Source: https://dev.risczero.com/api/2.0.0/zkvm/examples This snippet demonstrates how to run RISC Zero examples. It includes checking the installed RISC Zero version and checking out the corresponding Git branch before executing the example. Ensure you have all RISC Zero tools installed. ```bash cargo risczero --version ``` ```bash git checkout release-$MAJOR.$MINOR ``` ```bash cargo run --release ``` -------------------------------- ### Manual Installation: Clone Repository Source: https://dev.risczero.com/api/2.0.0/zkvm/install Clones the official RISC Zero GitHub repository to your local machine. This is the starting point for manual installation and building from source. ```Shell git clone https://github.com/risc0/risc0.git ``` -------------------------------- ### Run RISC Zero Examples Source: https://dev.risczero.com/api/2.1/zkvm/examples Instructions for running RISC Zero zkVM examples. This involves checking the installed RISC Zero version and then executing the example using Cargo. ```Shell cargo risczero --version ``` ```Shell git checkout release-$MAJOR.$MINOR ``` ```Shell cargo run --release ``` -------------------------------- ### RISC Zero zkVM Hello World Tutorial Source: https://dev.risczero.com/api/zkvm/tutorials/overview This tutorial guides users through creating a basic zkVM project and generating a proof of execution for their program on the RISC Zero zkVM. It's the recommended starting point for new users. -------------------------------- ### Manual Installation of cargo-risczero Source: https://dev.risczero.com/api/1.1/zkvm/install Installs the `cargo-risczero` tool manually after checking out a specific release branch. For example, `git checkout origin/release-1.1` for version 1.1.0. ```bash git checkout origin/release-1.1 cargo install --path risc0/cargo-risczero ``` -------------------------------- ### Run the Hello World Example Source: https://dev.risczero.com/api/next/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' zkVM application in release mode. Use this command to test your setup and progress. ```bash cargo run --release ``` -------------------------------- ### Install Specific RISC Zero Version Source: https://dev.risczero.com/api/1.1/zkvm/install Installs a specific version of the `cargo-risczero` tool. Replace `` with the desired release tag, for example, `v1.1.1`. ```bash rzup install cargo-risczero ``` -------------------------------- ### Run the Hello World Example Source: https://dev.risczero.com/api/2.2/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' zkVM example in release mode. Use this command to test your setup and verify your progress. ```Shell cargo run --release ``` -------------------------------- ### Run the Hello World Example Source: https://dev.risczero.com/api/2.1/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' RISC Zero zkVM application in release mode. ```bash cargo run --release ``` -------------------------------- ### Clone and Navigate RISC Zero Hello World Example Source: https://dev.risczero.com/api/zkvm/tutorials/hello-world This snippet shows how to clone the RISC Zero monorepo and navigate to the 'hello-world' example directory. It's the first step in setting up the project. ```Shell git clone https://github.com/risc0/risc0 cd risc0/examples/hello-world ``` -------------------------------- ### Checkout RISC Zero Example Version Source: https://dev.risczero.com/api/1.1/zkvm/examples This snippet demonstrates how to checkout the correct Git branch for RISC Zero examples, matching the locally installed version. This ensures the examples compile and run correctly with your RISC Zero setup. ```bash git checkout release-$MAJOR.$MINOR# e.g. release-1.0 ``` -------------------------------- ### RISC Zero Hello World Tutorial Source: https://dev.risczero.com/api/0.20/zkvm/tutorials/overview This tutorial is a recommended starting point for new users. It covers the process of creating a zkVM project and generating a proof of execution for a program within the zkVM environment. ```Rust This is documentation for RISC Zero Developer Docs **0.20** , which is no longer actively maintained. For up-to-date documentation, see the **latest version** (3.0). * * zkVM * Tutorials Version: 0.20 # Tutorials Here we gather a list of tutorials. We are currently working on creating more tutorials: * **Hello World** : a recommended place to start. Learn how to create a zkVM project and how to generate a proof of execution of your program on zkVM. ``` -------------------------------- ### Run the RISC Zero Hello World Example Source: https://dev.risczero.com/api/1.2/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' RISC Zero zkVM application in release mode. It's used to execute the example and check your progress. ```bash cargo run --release ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/0.18/zkvm/quickstart Installs the RISC Zero toolchain using Cargo, a package manager for Rust. This is a prerequisite for using the RISC Zero zkVM. ```bash cargo install cargo-risczero ``` ```bash cargo risczero install ``` -------------------------------- ### Run the RISC Zero Hello World Example Source: https://dev.risczero.com/api/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' zkVM application in release mode. It's used to test your setup and progress. ```Shell cargo run --release ``` -------------------------------- ### Check RISC Zero Version Source: https://dev.risczero.com/api/zkvm/examples This command retrieves the currently installed version of the RISC Zero tools. This is useful for ensuring you check out the correct version of the examples to match your local setup. ```Shell cargo risczero --version ``` -------------------------------- ### Run RISC Zero Example Source: https://dev.risczero.com/api/1.0/zkvm/examples This snippet shows how to check the installed RISC Zero version and then run a specific example from the repository. It requires the RISC Zero tools to be installed and the correct version of the example to be checked out. ```bash cargo risczero --version ``` ```bash git checkout release-$VERSION ``` ```bash cargo run --release ``` -------------------------------- ### RISC Zero zkVM Hello World Tutorial Source: https://dev.risczero.com/api/0.19/zkvm/tutorials/overview A foundational tutorial for RISC Zero zkVM development. It guides users through creating a zkVM project and generating a proof of execution for their program within the zkVM environment. This is the recommended starting point for new developers. ```Rust This is documentation for RISC Zero Developer Docs **0.19** , which is no longer actively maintained. For up-to-date documentation, see the **latest version** (3.0). * * zkVM * Tutorials Version: 0.19 # Tutorials Here we gather a list of tutorials. We are currently working on creating more tutorials: * **Hello World** : a recommended place to start. Learn how to create a zkVM project and how to generate a proof of execution of your program on zkVM. Previous Performance Benchmarks Next Hello World Tutorial ``` -------------------------------- ### Clone RISC Zero Monorepo and Navigate to Hello World Example Source: https://dev.risczero.com/api/1.2/zkvm/tutorials/hello-world This snippet shows how to clone the RISC Zero monorepo from GitHub and then change the directory to the 'hello-world' example. This is the initial step for setting up the project. ```bash git clone https://github.com/risc0/risc0 cd risc0/examples/hello-world ``` -------------------------------- ### Manual Installation: Install rzup Source: https://dev.risczero.com/api/2.2/zkvm/install Installs the `rzup` tool from the local repository using Cargo. ```Shell cargo install --path rzup ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/2.0.0/zkvm/quickstart Installs the RISC Zero toolchain, including `rzup` and `cargo-risczero`, using a curl command to download and execute an installation script. ```bash curl -L https://risczero.com/install | bash ``` ```bash rzup install ``` -------------------------------- ### Manual Installation: Install rzup Source: https://dev.risczero.com/api/1.2/zkvm/install Installs the `rzup` tool from the cloned repository using Cargo. This is part of the manual installation process. ```Shell cargo install --path rzup ``` -------------------------------- ### Install rzup Source: https://dev.risczero.com/api/1.0/zkvm/install Installs the RISC Zero toolchain installer script. This is the recommended first step for managing RISC Zero installations. ```Shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Run RISC Zero Example Source: https://dev.risczero.com/api/2.2/zkvm/examples This snippet demonstrates how to run RISC Zero examples using the Cargo command-line tool. It includes commands for checking the installed RISC Zero version and for executing the example in release mode. Ensure you have the correct version of the example checked out that corresponds to your local RISC Zero installation. ```bash cargo risczero --version ``` ```bash git checkout release-$MAJOR.$MINOR ``` ```bash cargo run --release ``` -------------------------------- ### Checkout Example Release Branch Source: https://dev.risczero.com/api/2.1/zkvm/tutorials/hello-world This command checks out a specific release branch for the example to match the local 'cargo-risczero' installation version. Replace $MAJOR.$MINOR with your version numbers. ```bash git checkout release-$MAJOR.$MINOR ``` -------------------------------- ### Checkout RISC Zero Example Release Branch Source: https://dev.risczero.com/api/zkvm/tutorials/hello-world This command checks out the correct release branch for the 'hello-world' example to match your local `cargo-risczero` installation version. Replace `$MAJOR.$MINOR` with your version numbers. ```Shell git checkout release-$MAJOR.$MINOR ``` -------------------------------- ### Manual Installation: Install cargo-risczero Source: https://dev.risczero.com/api/2.2/zkvm/install Installs the `cargo-risczero` tool after checking out a specific release branch. This is part of the manual installation process for specific versions. ```Shell git checkout origin/release-1.1 cd risc0/cargo-risczero cargo install --path . ``` -------------------------------- ### Run the Hello World Example Source: https://dev.risczero.com/api/2.3/zkvm/tutorials/hello-world This command executes the 'hello-world' RISC Zero zkVM application in release mode. It's used to build, prove, and verify the example. ```Shell cargo run --release ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/2.0.0/zkvm/install Installs the `rzup` command-line tool, which is the RISC Zero toolchain installer. This is the recommended first step for managing RISC Zero installations. ```Shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/1.1/zkvm/install Installs the RISC Zero toolchain installer (`rzup`) using a curl command. This is the first step for managing RISC Zero installations. ```bash curl -L https://risczero.com/install | bash ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/2.3/zkvm/install Installs the RISC Zero toolchain installer (`rzup`) using a curl command. This is the recommended first step for managing RISC Zero installations. ```shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Create RISC Zero zkVM Project Source: https://dev.risczero.com/api/0.19/zkvm/tutorials/hello-world Uses the `cargo-risczero` tool to create a new RISC Zero zkVM project with a specified guest name. It also includes the command to navigate into the project directory. ```Shell cargo risczero new hello-world --guest-name hello_guest cd hello-world ``` -------------------------------- ### Run the Hello World Example Source: https://dev.risczero.com/api/2.0.0/zkvm/tutorials/hello-world This command compiles and runs the 'hello-world' zkVM application in release mode. It's used to execute the example and check your progress. ```Shell cargo run --release ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/2.2/zkvm/install Installs the RISC Zero toolchain installer (`rzup`) using a curl command. This is the recommended first step for managing RISC Zero installations. ```Shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/2.1/zkvm/install Installs the RISC Zero toolchain installer, `rzup`, using a curl command. This is the recommended first step for managing RISC Zero installations. ```Shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/2.3/zkvm/quickstart Installs the RISC Zero toolchain, including `rzup` and `cargo-risczero`, using a curl command to download and execute an installation script. ```Shell curl -L https://risczero.com/install | bash ``` ```Shell rzup install ``` -------------------------------- ### Install rzup Tool Source: https://dev.risczero.com/api/1.2/zkvm/install Installs the RISC Zero toolchain installer, `rzup`, using a curl command. This is the recommended first step for managing RISC Zero installations. ```Shell curl -L https://risczero.com/install | bash ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/next/zkvm/quickstart Installs the RISC Zero toolchain, including `rzup` and `cargo-risczero`, using a curl command to download and execute an installation script. ```Shell curl -L https://risczero.com/install | bash ``` ```Shell rzup install ``` -------------------------------- ### Manual Installation: Install cargo-risczero Source: https://dev.risczero.com/api/2.0.0/zkvm/install Builds and installs the `cargo-risczero` tool from the RISC Zero repository. This involves checking out a specific release branch and then installing the tool using Cargo. ```Shell git checkout origin/release-1.1 cd risc0/cargo-risczero cargo install --path . ``` -------------------------------- ### Checkout Example Release Branch Source: https://dev.risczero.com/api/next/zkvm/tutorials/hello-world This command checks out a specific release branch for the 'hello-world' example to match your local 'cargo-risczero' version. Replace $MAJOR.$MINOR with your version numbers (e.g., release-1.2). ```bash git checkout release-$MAJOR.$MINOR # e.g. git checkout release-1.2 ``` -------------------------------- ### Manual Installation: Install rzup from Source Source: https://dev.risczero.com/api/2.0.0/zkvm/install Installs the `rzup` tool by building it from the cloned repository's source code. This method is used for manual installations or when contributing to `rzup` itself. ```Shell cargo install --path rzup ``` -------------------------------- ### Install RISC Zero Toolchain Source: https://dev.risczero.com/api/zkvm/quickstart Installs the RISC Zero toolchain, including `rzup` and `cargo-risczero`, which are essential for developing zkVM applications. This involves downloading and executing an installation script. ```Shell curl -L https://risczero.com/install | bash ``` ```Shell rzup install ``` -------------------------------- ### Create RISC Zero Project Source: https://dev.risczero.com/api/1.0/zkvm/quickstart Creates a new RISC Zero project using the `cargo-risczero` tool, specifying a guest program name for the zkVM execution. ```Shell cargo risczero new my_project --guest-name guest_code_for_zk_proof ``` -------------------------------- ### Install RISC Zero Dependencies Source: https://dev.risczero.com/api/1.1/zkvm/examples This snippet shows the command to check the installed version of RISC Zero tools. This is a prerequisite for running the examples and ensuring compatibility. ```bash cargo risczero --version ``` -------------------------------- ### Clone Risc0 Monorepo and Navigate to Example Source: https://dev.risczero.com/api/next/zkvm/tutorials/hello-world This snippet shows how to clone the risc0 monorepo from GitHub and then change the directory to the 'hello-world' example. This is the initial step for setting up the project. ```bash git clone https://github.com/risc0/risc0 cd risc0/examples/hello-world ```