Compile. Execute. Prove. Verify.
One ergonomic Rust API, multiple zero‑knowledge virtual machines.
- Unified Rust API for compiling, executing, proving & verifying zkVM programs
- Pluggable back‑ends – easily switch between different zkVMs
- SDK bootstrap scripts for every supported zkVM
- End‑to‑end test suite covering compilation → proof → verification for each backend
- SP1
- OpenVM
- Risc Zero
- Jolt
- Pico
- Zisk
- Nexus
This guide assumes you have Rust and Cargo installed. If not, please refer to the Rust installation guide. Choose your setup approach:
Install the required zkVM SDKs locally for better performance and debugging.
bash scripts/sdk_installers/install_sp1_sdk.sh
# Cargo.toml
[dependencies]
zkvm-interface = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.12" }
ere-sp1 = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.12" }
// main.rs
use ere_sp1::{EreSP1, RV32_IM_SUCCINCT_ZKVM_ELF};
use zkvm_interface::{Compiler, Input, ProverResourceType, zkVM};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let guest_directory = std::path::Path::new("workspace/guest");
// Compile guest
let compiler = RV32_IM_SUCCINCT_ZKVM_ELF;
let program = compiler.compile(guest_directory)?;
// Create zkVM instance
let zkvm = EreSP1::new(program, ProverResourceType::Cpu);
// Prepare inputs
let mut io = Input::new();
io.write(42u32);
// Execute
let _report = zkvm.execute(&io)?;
// Prove
let (proof, _report) = zkvm.prove(&io)?;
// Verify
zkvm.verify(&proof)?;
Ok(())
}
Use Docker for zkVM operations without installing SDKs locally. Only requires Docker to be installed.
# Cargo.toml
[dependencies]
zkvm-interface = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.12" }
ere-dockerized = { git = "https://github.com/eth-act/ere.git", tag = "v0.0.12" }
// main.rs
use ere_dockerized::{EreDockerizedCompiler, EreDockerizedzkVM, ErezkVM};
use zkvm_interface::{Compiler, Input, ProverResourceType, zkVM};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let guest_directory = std::path::Path::new("workspace/guest");
// Compile guest
let compiler = EreDockerizedCompiler::new(ErezkVM::SP1, std::path::Path::new("workspace"));
let program = compiler.compile(guest_directory)?;
// Create zkVM instance
let zkvm = EreDockerizedzkVM::new(ErezkVM::SP1, program, ProverResourceType::Cpu)?;
// Prepare inputs
let mut io = Input::new();
io.write(42u32);
// Execute
let _report = zkvm.execute(&io)?;
// Prove
let (proof, _report) = zkvm.prove(&io)?;
// Verify
zkvm.verify(&proof)?;
Ok(())
}
crates/
zkvm-interface/ ← core traits & types
ere-{backend}/ ← backend adapters (sp1, openvm, …)
tests/ ← guest programs & integration tests
scripts/sdk_installers/ ← SDK install helpers
docker/ ← Dockerfiles & build contexts
zkvm-interface
exposes two core traits:
- Compiler – compile a guest project into the correct zkVM artifact. For most this will be a RISCV ELF binary or some type that wraps it and includes extra metadata such as a proving and verifying key.
- zkVM – execute, prove & verify that artifact. A zkVM instance is created for specific
program
, where theprogram
comes from theCompiler
.
Each ere-{backend}
crate implements the above traits for its zkVM.
The Input
type supports both chunked (Vec<Vec<u8>>
) and contiguous (Vec<u8>
) modes to satisfy differing backend APIs.
PRs and issues are welcome!
zkVMs evolve quickly; expect breaking changes. Although the API is generic, its primary target is zkEVMs, which may for example, guide the default set of precompiles.
Licensed under either of
- MIT license (LICENSE‑MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE‑APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.