Quickstart
AI Coding Skill
Install the Jolt agent skill to let AI coding agents (Claude Code, Cursor, Codex, etc.) wrap Rust functions in Jolt proofs for you:
npx skills add a16z/jolt
Fallback (Claude Code / Codex):
curl -sfL jolt.rs/skill | bash
Installing
Start by installing the jolt command line tool.
cargo +nightly install --git https://github.com/a16z/jolt --force --bins jolt
Creating a Project
To create a project, use the jolt new command.
jolt new <PROJECT_NAME>
This will create a template Jolt project in the specified location. Make sure to cd into the project before running the next step.
cd <PROJECT_NAME>
Project Tour
The main folder contains the host, which is the code that can generate and verify proofs. Within this main folder, there is another package called guest which contains the Rust functions that we can prove from the host. For more information about these concepts refer to the guests and hosts section.
We'll start by taking a look at our guest. We can view the guest code in guest/src/lib.rs.
#![allow(unused)] #![cfg_attr(feature = "guest", no_std)] #![no_main] fn main() { #[jolt::provable] fn fib(n: u32) -> u128 { let mut a: u128 = 0; let mut b: u128 = 1; let mut sum: u128; for _ in 1..n { sum = a + b; a = b; b = sum; } b } }
As we can see, this implements a simple Fibonacci function called fib. All we need to do to make our function provable is add the jolt::provable macro above it.
Next let's take a look at the host code in src/main.rs.
pub fn main() { let target_dir = "/tmp/jolt-guest-targets"; let mut program = guest::compile_fib(target_dir); let shared = guest::preprocess_shared_fib(&mut program); let prover_pp = guest::preprocess_prover_fib(shared.clone()); let verifier_pp = guest::preprocess_verifier_fib( shared, prover_pp.generators.to_verifier_setup(), ); let prove_fib = guest::build_prover_fib(program, prover_pp); let verify_fib = guest::build_verifier_fib(verifier_pp); let (output, proof, program_io) = prove_fib(50); let is_valid = verify_fib(50, output, program_io.panic, proof); println!("output: {output}"); println!("valid: {is_valid}"); }
The host uses functions generated by the jolt::provable macro. The pipeline has four stages:
- Compile —
compile_fibcompiles the guest to RISC-V. - Preprocess —
preprocess_shared_fibproduces shared preprocessing, which is then split into prover and verifier preprocessing. This only depends on the program (not inputs) and can be reused across proofs. - Prove —
build_prover_fibreturns a closure with the same inputs as the original function. It returns the output, a proof, and aprogram_iodevice (which includes apanicflag). - Verify —
build_verifier_fibreturns a closure that takes the public inputs, claimed output, panic flag, and proof, returning a boolean.
Running
Let's now run the host with cargo.
cargo run --release
This will compile the guest, perform preprocessing, and execute the host code which proves and verifies the 50th Fibonacci number. Preprocessing only needs to be performed once for a given program, and can be reused to prove multiple invocations.
Note that many logs in the example are logged at the info level. To see these logs, you can set the RUST_LOG environment variable before running the host:
RUST_LOG=info cargo run --release
If everything is working correctly, you should see output similar to the following:
...
2025-11-05T22:17:43.849979Z INFO jolt_core::zkvm: Proved in 2.6s (0.4 kHz / padded 0.8 kHz)
2025-11-05T22:17:43.923164Z INFO example: output: 12586269025
2025-11-05T22:17:43.923300Z INFO example: valid: true
Development
Rust
To build Jolt from source, you will need Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Rustup should automatically install the Rust toolchain and necessary targets on
the first
cargoinvocation. You may also need to add the RISC-V target for building guest programs manually:rustup target add riscv64imac-unknown-none-elf.
mdBook
To build this book from source:
cargo install mdbook mdbook-katex
For watching the changes in your local browser:
mdbook watch book --open