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.
In addition to our reference documentation on docs.rs, we have 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:
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 following crate feature flags are available.
Note that in order to use risc0-zkvm
in the guest, you must disable default features (set default-features=false
).
| Feature | Target(s) | Implies | Description |
| --- | --- | --- | ---- |
| cuda || prove, std | Turns on CUDA GPU acceleration for the prover. Requires CUDA toolkit to be installed. |
metal |macos|prove|Turns on Metal GPU acceleration for the prover
profiler|all|--|Tracks where cycles are spent during guest execution as an aid to code optimization
prove|all except rv32im|std| Disable this feature if you want to use the guest
module in guest-side code
std|all|--|Support for stdlib in the guest
r0vm
binary tool to profile guest codeguest
module in guest-side code (or if you only need the verifier, for the sake of excluding unnecessary code)metal
or cuda
is selected