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 pull
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
The RISC Zero toolchain must match the version of crates you are compiling.
When testing and running examples within this library, you can install cargo-risczero
from source:
cargo install --force --path risc0/cargo-risczero
cargo risczero install
Otherwise, if using a stable version branch, you can install cargo-risczero
through the standard flow:
cargo install cargo-binstall
cargo binstall cargo-risczero
cargo risczero install
Optionally, you can specify which version of cargo-risczero
to install with:
cargo binstall cargo-risczero@<version>
NOTE: It is only important that you install
cargo-risczero
with a matching version of thezkvm
crate when interacting with the proof system as a separate, pre-built process (ExternalProver
), which is currently the default. If you are using theprove
feature on therisc0-zkvm
crate for the host, this will compile the proving system into the host binary.
curl -L https://foundry.paradigm.xyz | bash
foundryup
xtask wasm tools (if testing browser-verify)
cargo xtask install
cargo xtask gen-receipt
Before submitting a PR, ensure the following:
- Fork the
risc0
repository and create a new branch there to do your work. - Format with
cargo fmt --all
. - Lint with
cargo clippy --all-targets
. - Tests pass with
cargo test -F default -F prove --workspace
- Open a PR against the
main
branch.