Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
cargo-risczero
Cargo extension to help create, manage, and test RISC Zero
projects. The default template generated from the cargo risczero new command
supports both local and remote proving. Refer to the README in the rust-starter
template for more information.
Installation
To install this Cargo subcommand, first you'll want to install Rust and then you'll execute:
|
To install from local source, use:
After that you can verify it works via:
Docker
In order to use the build command, you will need docker available in your
PATH. For developer machines, this is simple with Docker
Desktop.
install
The install command installs the latest RISC Zero toolchain. This toolchain is
needed to compile guest programs into ELF binaries that the zkVM can execute.
You can verify it was installed correctly by running:
|
Note that the following pre-built host targets are available:
aarch64-apple-darwinx86_64-unknown-linux-gnu
If you'd like to install the toolchain on a host not listed above, you can use
the build-toolchain command to build the toolchain locally.
new
The new command will create a new project from an existing template. It
defaults to the rust-starter template but can be used with other
templates locally or hosted on github.
Examples
# Create a project from the main template
# Create a project with 'no_std' in the guest
# Disable git initialization
# Create from github template
build-toolchain
Use the build-toolchain command to build the toolchain locally for your host.
Warning: this may take a long time. The resulting toolchain will be
automatically installed via rustup toolchain link.
build
Use the build command to build guest code for the zkVM target
riscv32im-risc0-zkvm-elf deterministically.
The compiled ELF is saved in: ./target/riscv-guest/riscv32im-risc0-zkvm-elf/docker/
With this containerized build process, we ensure that all builds of your guest code, regardless of the machine or local environment, will produce the same ImageID. The ImageID, and its importance to security, is explained in more detail in our developer FAQ.
Note: The build command requires the docker CLI installed and in your PATH.
Example
# Build the zkVM's test examples
datashet
The datasheet command performs a benchmark to evaluate zkVM performance for
the current machine's hardware, and then prints a table (along with optional
--json output).
See our benchmarks for numbers you can expect to see from this.
Schema:
type Datasheet = BenchmarkData[]
type BenchmarkData = {
name: string,
hashfn: string,
throughput: number,
duration: number,
cycles: number,
seal: number,
}