37 releases (10 breaking)

1.0.0-rc.2 Dec 3, 2022
0.21.0 Mar 12, 2024
0.20.1 Feb 1, 2024
0.20.0-rc.1 Dec 19, 2023
0.11.1 Aug 13, 2022

#66 in Cryptography

Download history 313/week @ 2023-12-23 566/week @ 2023-12-30 1012/week @ 2024-01-06 822/week @ 2024-01-13 986/week @ 2024-01-20 1026/week @ 2024-01-27 784/week @ 2024-02-03 1066/week @ 2024-02-10 1330/week @ 2024-02-17 1475/week @ 2024-02-24 2041/week @ 2024-03-02 2100/week @ 2024-03-09 2025/week @ 2024-03-16 1952/week @ 2024-03-23 2068/week @ 2024-03-30 1228/week @ 2024-04-06

7,600 downloads per month
Used in 17 crates

Apache-2.0 and maybe LGPL-3.0-or-later

219K SLoC

C++ 103K SLoC // 0.4% comments Rust 86K SLoC // 0.0% comments CUDA 14K SLoC // 0.0% comments Metal Shading Language 14K SLoC // 0.0% comments Bitbake 1.5K SLoC // 0.0% comments GNU Style Assembly 371 SLoC // 0.5% comments

The RISC Zero zkVM is a RISC-V virtual machine that produces zero-knowledge proofs of code it executes. By using the zkVM, a cryptographic receipt is produced which anyone can verify was produced by the zkVM's guest code. No additional information about the code execution (such as, for example, the inputs provided) is revealed by publishing the receipt.

Additional (non-reference) resources for using our zkVM that you may also find helpful, especially if you're new to the RISC Zero zkVM. These include:

  • Our zkVM Tutorial, which walks you through writing your first zkVM project.
  • The cargo risczero tool. It includes a new command which generates code for building and launching a zkVM guest and guidance on where projects most commonly modify host and guest code.
  • The examples, which contains various examples using our zkVM.
  • This clip from our presentation at ZK Hack III gives an overview of the RISC Zero zkVM. Our YouTube channel has many more videos as well.
  • We track zkVM issues with known workarounds using the rust guest workarounds GitHub tag. If you're having problems running your code in the zkVM, you can see if there's a workaround, and if you're using a workaround, you can track when it gets resolved to a permanent solution.
  • And more on the RISC Zero developer website!

Crate Feature Flags

The following feature flags are supported.

Note that in order to use risc0-zkvm in the guest, you must disable the "prove" feature by setting default-features = false.

Feature Target(s) Implies Description
client all except rv32im std Enables the client API.
cuda prove, std Enables CUDA GPU acceleration for the prover. Requires CUDA toolkit to be installed.
disable-dev-mode all except rv32im Disables dev mode so that proving and verifying may not be faked. Used to prevent a misplaced RISC0_DEV_MODE from breaking security in production systems.
metal macos prove, std Enables Metal GPU acceleration for the prover.
prove all except rv32im std Enables the prover, incompatible within the zkvm guest.
std all Support for the Rust stdlib.


~408K SLoC