Skip to main content
The 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
required
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
Path to the jolt-emu emulator binary.If not specified, the command searches in this order:
  1. JOLT_EMU_PATH environment variable
  2. System PATH
  3. Common relative locations:
    • target/release/jolt-emu
    • target/debug/jolt-emu
    • ../jolt/target/release/jolt-emu
    • ../jolt/target/debug/jolt-emu
string[]
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
Path to the jolt-emu binary. Alternative to --jolt-emu flag.
string
Controls backtrace output when the guest panics.
  • 1 - Enable backtraces with function names and file:line
  • full - Include register snapshots and cycle counts per frame
The emulator always captures the call stack. JOLT_BACKTRACE controls symbol resolution only.
string
Log level for the emulator. Valid values: error, warn, info, debug, trace.

Examples

Basic Execution

Run a compiled guest binary:
Output:

With Explicit Emulator Path

Specify the emulator location:

With Backtrace Enabled

Run with backtrace support for debugging:
If the guest panics:

With Full Debug Info

Show register state and cycle counts:
Output includes:

Passing Emulator Arguments

Forward custom arguments to the emulator:

With Environment Variable

Set emulator path via environment:

Emulator Location

The jolt run command searches for jolt-emu in the following order:
  1. --jolt-emu flag - Explicit path provided
  2. JOLT_EMU_PATH env var - Environment variable
  3. System PATH - Uses which jolt-emu
  4. Common relative paths:
    • target/release/jolt-emu
    • target/debug/jolt-emu
    • ../jolt/target/release/jolt-emu
    • ../jolt/target/debug/jolt-emu
If none are found, the command fails with:

Installing jolt-emu

The emulator is part of the Jolt repository. To build it:

Exit Codes

The jolt 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:
Guest programs support println! for debugging:

Trace Analysis

For detailed execution tracing without proving:
This runs the guest on the emulator but skips the expensive proving step, enabling faster iteration during development.

Emulator vs. Prover

Workflow Example

Limitations

The emulator does not produce cryptographic proofs. It only executes guest code for testing. To generate proofs, use the host code via cargo run.

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

Solution: Build the guest first:

Emulator Not Found

Solution: Install or build the emulator:

Execution Fails

Possible causes:
  • 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

Solution: Rebuild with symbols:

jolt build

Build guest binaries for the emulator

CLI Overview

Learn about all CLI commands