Thank you for your interest in contributing to RISC Zero! We welcome contributions from everyone.
If you have any questions about contributing, or about the project in general, please ask in our Discord channel.
To run the test suite, the following dependencies are needed:
Once installed, run:
git lfs install
git lfs pullcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shRun rzup install to install the latest Rust and C++ toolchains.
cargo run --bin rzup install rust
cargo run --bin rzup install cppThe versions of r0vm and cargo-risczero must match the source code. Compile and install these
from source when using a development branch. The cargo-risczero package includes both the r0vm
and cargo-risczero binaries.
cargo install --force --path risc0/cargo-risczeroOtherwise, if using a stable version branch, you can install cargo-risczero through the standard flow:
curl -L https://risczero.com/install | bash
rzup installNOTE: It is only important that you install
cargo-risczerowith a matching version of thezkvmcrate when interacting with the proof system as a separate, pre-built process (DefaultProver), which is currently the default. If you are using theprovefeature on therisc0-zkvmcrate for the host, this will compile the proving system into the host binary.
xtask wasm tools (if testing browser-verify)
cargo xtask install
cargo xtask gen-receiptBefore submitting a PR, ensure the following:
- Fork the
risc0repository and create a new branch there to do your work. - Format with
cargo fmt --all. - Lint with:
RISC0_SKIP_BUILD=1 cargo clippy $(cd examples && RISC0_SKIP_BUILD=1 cargo clippy) $(cd benchmarks && RISC0_SKIP_BUILD=1 cargo clippy) - Perform the license check with
python3 license-check.py. - Tests pass with:
cargo test -F prove -F docker $(cd examples && cargo test) $(cd benchmarks && cargo test) - Commit any outdated
Cargo.lockfiles. - Open a PR against the
mainbranch.