Skip to content

Commit a2a026f

Browse files
authored
add contributing doc (risc0#1215)
Opening draft for visibility, would like to get risc0#1214 completed before this comes in to avoid having to include the version pinning semantics into this doc.
1 parent 0765685 commit a2a026f

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

CONTRIBUTING.md

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Contributing to risc0
2+
3+
Thank you for your interest in contributing to RISC Zero! We welcome contributions from everyone.
4+
5+
If you have any questions about contributing, or about the project in general, please ask in our [Discord channel](https://discord.gg/risczero).
6+
7+
## Quick Start
8+
9+
To run the test suite, the following dependencies are needed:
10+
11+
#### [Git Large File Storage](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)
12+
13+
Once installed, run:
14+
15+
```console
16+
git lfs install
17+
git lfs pull
18+
```
19+
20+
#### [Rust](https://www.rust-lang.org/tools/install)
21+
22+
```console
23+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
24+
```
25+
26+
#### [RISC Zero toolchain](https://dev.risczero.com/api/zkvm/quickstart#1-install-the-risc-zero-toolchain)
27+
28+
The RISC Zero toolchain must match the version of crates you are compiling.
29+
30+
When testing and running examples within this library, you can install `cargo-risczero` from source:
31+
32+
```console
33+
cargo install --force --path risc0/cargo-risczero
34+
cargo risczero install
35+
```
36+
37+
Otherwise, if using a stable version branch, you can install `cargo-risczero` through the standard flow:
38+
39+
```console
40+
cargo install cargo-binstall
41+
cargo binstall cargo-risczero
42+
cargo risczero install
43+
```
44+
45+
Optionally, you can specify which version of `cargo-risczero` to install with:
46+
47+
```console
48+
cargo binstall cargo-risczero@<version>
49+
```
50+
51+
> NOTE: It is only important that you install `cargo-risczero` with a matching version of the `zkvm` crate when interacting with the proof system as a separate, pre-built process ([`ExternalProver`](https://docs.rs/risc0-zkvm/latest/risc0_zkvm/struct.ExternalProver.html)), which is currently the default. If you are using the `prove` feature on the `risc0-zkvm` crate for the host, this will compile the proving system into the host binary.
52+
53+
#### [Foundry](https://book.getfoundry.sh/getting-started/installation)
54+
55+
```console
56+
curl -L https://foundry.paradigm.xyz | bash
57+
foundryup
58+
```
59+
60+
#### xtask wasm tools (if testing [browser-verify](./examples/browser-verify))
61+
62+
```console
63+
cargo xtask install
64+
cargo xtask gen-receipt
65+
```
66+
67+
## PR Checklist
68+
69+
Before submitting a PR, ensure the following:
70+
71+
1. Fork the `risc0` repository and create a new branch there to do your work.
72+
2. Format with `cargo fmt --all`.
73+
3. Lint with `cargo clippy --all-targets`.
74+
4. Tests pass with `cargo test -F default -F prove --workspace`
75+
5. Open a PR against the `main` branch.

website/docs/contributors-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ _This page describes guidelines for community contributions to this [website](ht
66
>
77
> - Make suggestions or report bugs via [GitHub issues](https://github.com/risc0/risc0/issues)
88
> - Contribute website content or give feedback on [open pull requests](https://github.com/risc0/risc0/pulls)
9-
> - Contribute to the [main zkVM project](https://github.com/risc0/risc0)
9+
> - Contribute to the [main zkVM project](https://github.com/risc0/risc0) (see [CONTRIBUTING](https://github.com/risc0/risc0/blob/main/CONTRIBUTING.md))
1010
> - Contribute to our tutorials and how-to guides for our [templates](https://github.com/risc0/risc0/tree/main/templates) and [Rust examples](https://github.com/risc0/risc0/tree/v0.18.0/examples)
1111
> - Ask questions on [Discord](https://discord.gg/risczero)
1212

0 commit comments

Comments
 (0)