jolt run command executes a compiled RISC-V ELF binary on the Jolt emulator (jolt-emu), which emulates the zkVM environment for testing and development.
Usage
Arguments
Path to the RISC-V ELF binary to execute.This should be a binary compiled with
jolt build or a compatible RISC-V toolchain targeting RV64IMAC.Options
Path to the
jolt-emu emulator binary.If not specified, the command searches in this order:JOLT_EMU_PATHenvironment variable- System
PATH - Common relative locations:
target/release/jolt-emutarget/debug/jolt-emu../jolt/target/release/jolt-emu../jolt/target/debug/jolt-emu
Additional arguments passed directly to
jolt-emu.All arguments after -- are forwarded to the emulator:The
EMU_ARGS are emulator-specific and depend on the jolt-emu implementation. Refer to jolt-emu --help for available options.Environment Variables
Path to the
jolt-emu binary. Alternative to --jolt-emu flag.Controls backtrace output when the guest panics.
1- Enable backtraces with function names and file:linefull- Include register snapshots and cycle counts per frame
The emulator always captures the call stack.
JOLT_BACKTRACE controls symbol resolution only.Log level for the emulator. Valid values:
error, warn, info, debug, trace.Examples
Basic Execution
Run a compiled guest binary:With Explicit Emulator Path
Specify the emulator location:With Backtrace Enabled
Run with backtrace support for debugging:With Full Debug Info
Show register state and cycle counts:Passing Emulator Arguments
Forward custom arguments to the emulator:With Environment Variable
Set emulator path via environment:Emulator Location
Thejolt run command searches for jolt-emu in the following order:
--jolt-emuflag - Explicit path providedJOLT_EMU_PATHenv var - Environment variable- System PATH - Uses
which jolt-emu - Common relative paths:
target/release/jolt-emutarget/debug/jolt-emu../jolt/target/release/jolt-emu../jolt/target/debug/jolt-emu
Installing jolt-emu
The emulator is part of the Jolt repository. To build it:Exit Codes
Thejolt run command exits with:
- 0 - Guest program completed successfully
- 1 - Guest program panicked or returned non-zero
- Exit code - Propagates guest program’s exit code
Debugging Guest Programs
Enable Backtraces
For panic debugging:Print Statements
Guest programs supportprintln! for debugging:
Trace Analysis
For detailed execution tracing without proving:Emulator vs. Prover
| Aspect | jolt run (Emulator) | cargo run (Prover) |
|---|---|---|
| Purpose | Test execution, debug | Generate proofs |
| Speed | Fast (seconds) | Slow (minutes) |
| Output | Program output | Proof + verification |
| Use case | Development, testing | Production proving |
Workflow Example
Limitations
Emulator Capabilities
- ✅ Executes RISC-V RV64IMAC instructions
- ✅ Supports syscalls (print, panic, I/O)
- ✅ Captures execution traces
- ✅ Detects panics and provides backtraces
- ✅ Measures cycle counts
- ❌ Does not generate zero-knowledge proofs
- ❌ Does not verify proofs
Troubleshooting
Binary Not Found
Emulator Not Found
Execution Fails
- Emulator binary is not executable:
chmod +x /path/to/jolt-emu - Wrong architecture (emulator must match host, not guest)
- Corrupted binary: rebuild with
cargo build -p tracer
Panic Without Backtrace
Related Commands
jolt build
Build guest binaries for the emulator
CLI Overview
Learn about all CLI commands