Skip to main content

Overview

The jolt generate command provides utilities for advanced users who need to customize the RISC-V target specification or linker script for their guest programs. This is useful when working with custom memory layouts or non-standard build configurations.

Subcommands

jolt generate target

Generates a custom RISC-V target specification JSON file.
string
Use a predefined target profile
string
Specify a custom target triple
string
default:"<target-triple>.json"
Output path for the generated target specification (short: -o)
Example:
The generated JSON file contains the complete target specification including:
  • Architecture settings (data layout, pointer width)
  • ABI configuration
  • Supported features
  • Linker configuration
You can then use this target specification with rustc --target=my-target.json for custom builds.

jolt generate linker

Generates a linker script with custom memory layout.
string
default:"linker.ld"
Output path for the generated linker script (short: -o)
hex
Starting address for RAM
hex
Size of RAM region
hex
Size of the stack region
hex
Size of the heap region
Example:
The generated linker script defines:
  • Memory regions (RAM, ROM, etc.)
  • Section placements (.text, .data, .bss, .heap, .stack)
  • Entry point and initialization code locations

Use Cases

Custom Memory Layout

When you need a specific memory layout for your guest program:

Cross-Compilation

When targeting a custom RISC-V variant:

Debugging Build Issues

Generate the default configuration to understand what Jolt uses:

Notes

Most users do not need these commands. The default target specification and linker script work for typical zkVM programs.
Custom target specifications must be compatible with RV64IMAC instruction set. Jolt requires specific RISC-V features to function correctly.
  • jolt build - Build guest programs (uses target specs internally)
  • jolt new - Create new projects (includes default configuration)