Installation
Install the Jolt CLI using cargo:Available Commands
The Jolt CLI provides the following commands:| Command | Description |
|---|---|
jolt new | Creates a new Jolt project with the specified name |
jolt build | Build a guest program for Jolt zkVM |
jolt run | Run an ELF binary on the Jolt emulator |
jolt generate | Generate target specs or linker scripts |
jolt build-wasm | Handles preprocessing and generates WASM compatible files |
Common Workflows
Creating a New Project
Start by creating a new Jolt project:- Host code in
src/ - Guest code in
guest/src/ - Pre-configured
Cargo.tomlfiles - Rust toolchain configuration
Building Guest Programs
Build your guest program for the Jolt zkVM:Running on the Emulator
Execute a compiled guest binary on the Jolt emulator:Environment Variables
The CLI respects several environment variables for configuration:Build Configuration
Controls the optimization level for guest builds. Valid values:
0, 1, 2, 3, s, z.Enables backtrace support for guest panics. Preserves symbols in the ELF for debugging.
1- Enable backtraces with function names and file:line infofull- Include register snapshots and cycle counts per frame
Emulator Configuration
Path to the
jolt-emu binary. If not set, the CLI searches PATH and common locations.Logging
Controls log level output. Set to
info, debug, or trace for more verbose output.Target Architecture
Jolt targets RISC-V 64-bit with the following extensions:- RV64I - Base Integer Instruction Set
- M - Integer Multiplication and Division
- A - Atomic Instructions
- C - Compressed Instructions
riscv64imac-unknown-none-elf for no_std guests.
Build Modes
No-std Mode (Default)
Builds guest programs without the Rust standard library:riscv64imac-unknown-none-elf
Std Mode
Builds with standard library support using musl libc:riscv64imac-zero-linux-musl
This mode automatically installs or builds the required toolchain components (musl, gcc libs) if not already present.
Next Steps
jolt new
Create new Jolt projects
jolt build
Build guest programs with all options
jolt run
Run binaries on the emulator