MCPcopy Index your code
hub / github.com/eth-act/ere

github.com/eth-act/ere @v0.13.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.13.0 ↗ · + Follow
806 symbols 1,623 edges 175 files 128 documented · 16% updated 3d agov0.13.0 · 2026-07-06★ 8429 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ere logo

Ere – Unified zkVM Interface & Toolkit

Compile. Execute. Prove. Verify.

One ergonomic Rust API, multiple zero‑knowledge virtual machines.


Table of Contents

Supported Rust Versions (MSRV)

The current MSRV (minimum supported rust version) is 1.91.

Overview

This repository contains the following crates:

  • Traits
  • [ere-compiler-core] - Compiler trait and Elf type for compiling guest programs
  • [ere-prover-core] - zkVMProver trait, Input, ProverResource, and execution/proving reports
  • [ere-platform-core] - Platform trait for guest program
  • [ere-verifier-core] - zkVMVerifier trait and PublicValues
  • Per-zkVM implementations for [ere-compiler-core] (host)
  • [ere-compiler-airbender]
  • [ere-compiler-openvm]
  • [ere-compiler-risc0]
  • [ere-compiler-sp1]
  • [ere-compiler-zisk]
  • Per-zkVM implementations for [ere-prover-core] (host)
  • [ere-prover-airbender]
  • [ere-prover-openvm]
  • [ere-prover-risc0]
  • [ere-prover-sp1]
  • [ere-prover-zisk]
  • Per-zkVM implementations for [ere-platform-core] (guest)
  • [ere-platform-airbender]
  • [ere-platform-openvm]
  • [ere-platform-risc0]
  • [ere-platform-sp1]
  • [ere-platform-zisk]
  • Per-zkVM implementations for [ere-verifier-core] (lightweight host verifier)
  • [ere-verifier-airbender]
  • [ere-verifier-openvm]
  • [ere-verifier-risc0]
  • [ere-verifier-sp1]
  • [ere-verifier-zisk]
  • [ere-dockerized] - Docker wrapper that spawns [ere-server] containers to run zkVM operations without local SDK installation
  • [ere-cluster-client-zisk] - ZisK distributed-cluster client used by [ere-prover-zisk] when ProverResource::Cluster is selected
  • [ere-codec] - Canonical byte codec (Encode/Decode + macros) shared across crates
  • [ere-catalog] - Catalog of supported zkVMs and compilers (zkVMKind, CompilerKind, SDK versions, Docker image tag)
  • Internal crates
  • [ere-compiler] - CLI binary to run Compiler used by [ere-dockerized]
  • [ere-server] - Server binary that exposes zkVMProver operations over gRPC (also provides a keygen subcommand)
  • [ere-server-api] - gRPC wire contract (proto/api.proto and generated prost/twirp types) shared by [ere-server] and [ere-server-client]
  • [ere-server-client] - Client library for [ere-server], used by [ere-dockerized]
  • [ere-util-build] - Build-time utilities (SDK version + Docker image tag detection)
  • [ere-util-compile] - Cross-compilation utilities (CargoBuildCmd, RustTarget, toolchain management)
  • [ere-util-test] - Testing utilities (Program, TestCase, BasicProgram, codec markers)
  • [ere-util-tokio] - Tokio runtime bridge (block_on) used by sync constructors that call async SDK APIs

Architecture

The Interface

Host-side traits:

  • Compiler (from ere-compiler-core)

Compile a guest program into an Elf.

  • zkVMProver (from ere-prover-core)

Execute, prove and verify. A zkVM prover instance is created for an Elf produced by a Compiler. Elf specific verifying key generation happens in the constructor.

  • zkVMVerifier (from ere-verifier-core)

zkVM verifier that is created by a succinct ProgramVk for specific Elf produced by zkVMProver. A zkVM verifier instance verifies a Proof and returns PublicValues. Pulled in standalone by verify-only consumers without the prover deps if upstream zkVM SDK provides verifier-only crate.

Guest-side trait (ere-platform-core):

  • Platform

Provides platform-dependent methods for IO read/write and cycle tracking. It also re-exports the runtime SDK of the zkVM, guaranteed to match the host when ere-prover-{zkvm} and ere-platform-{zkvm} share the same version.

Communication between Host and Guest

Host and guest communicate through raw bytes. Serialization/deserialization can be done in any way as long as they agree with each other.

Reading Private Values from Host

The Input structure holds stdin as raw bytes. Set them with Input::new().with_stdin(data), and the guest reads them back via Platform::read_input().

For Airbender and RISC Zero, the prover internally prepends a u32 LE byte-length prefix because their guest input APIs read u32 words and need a length to stop. SP1, OpenVM, and ZisK pass bytes through.

zkVM-specific stdin APIs (e.g., sp1_zkvm::io::read, risc0_zkvm::guest::env::read) can also be used directly when finer-grained control is needed.

Writing Public Values to Host

Public values written in the guest program (via Platform::write_output() or zkVM-specific output APIs) are returned as raw bytes to the host after zkVMProver::execute, zkVMProver::prove and zkVMProver::verify methods.

Different zkVMs handles public values in different approaches:

zkVM Size Limit Note
Airbender 32 bytes Padded to 32 bytes with zeros
OpenVM 256 bytes Padded to 256 bytes with zeros
RISC Zero unlimited Hashed internally
SP1 unlimited Hashed internally
ZisK 256 bytes

Supported zkVMs

zkVM Version ISA GPU Multi GPU Cluster
Airbender 73d69b5 RV32IMA V V
OpenVM 2.0.0-rc.3 RV32IMA V
RISC Zero 3.0.5 RV32IMA V V
SP1 6.3.0 RV64IMA V
ZisK 1.0.0-alpha RV64IMA V V V

Examples

With SDK Installation

Install the required zkVM SDKs locally for better performance and debugging.

1. Install SDKs

Install the SP1 SDK as an example

bash scripts/sdk_installers/install_sp1_sdk.sh

2. Create Guest Program

# guest/Cargo.toml

[workspace]

[package]
name = "guest"
edition = "2024"

[dependencies]
ere-platform-sp1 = { git = "https://github.com/eth-act/ere.git" }
// guest/src/main.rs

#![no_main]

use ere_platform_sp1::{sp1_zkvm, Platform, SP1Platform};

sp1_zkvm::entrypoint!(main);

type P = SP1Platform;

pub fn main() {
    // Read serialized input and deserialize it.
    let input = P::read_input();
    let n = u64::from_le_bytes(input.as_slice().try_into().unwrap());

    // Compute nth fib.
    let fib_n = fib(n);

    // Write serialized output.
    let output = [input.as_slice(), &fib_n.to_le_bytes()].concat();
    P::write_output(&output);
}

fn fib(n: u64) -> u64 {
    let mut a = 0;
    let mut b = 1;
    for _ in 0..n {
        let c = a + b;
        a = b;
        b = c;
    }
    a
}

3. Create Host

# host/Cargo.toml

[workspace]

[package]
name = "host"
edition = "2024"

[dependencies]
ere-prover-core = { git = "https://github.com/eth-act/ere.git" }
ere-prover-sp1 = { git = "https://github.com/eth-act/ere.git" }
// host/src/main.rs

use ere_compiler_core::Compiler;
use ere_compiler_sp1::SP1RustRv64imaCustomized;
use ere_prover_core::{Input, ProverResource, zkVMProver};
use ere_prover_sp1::SP1Prover;
use std::path::Path;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let guest_directory = Path::new("path/to/guest");

    // Compile guest program with SP1 customized toolchain
    let compiler = SP1RustRv64imaCustomized;
    let elf = compiler.compile(guest_directory, &[])?;

    // Create zkVM instance (setup/preprocessing happens here)
    let zkvm = SP1Prover::new(elf, ProverResource::Cpu)?;

    // Prepare input as raw bytes. The prover handles any framing needed by the SDK.
    let stdin = 10u64.to_le_bytes().to_vec();
    let input = Input::new().with_stdin(stdin.clone());
    let expected_output = [stdin, 55u64.to_le_bytes().to_vec()].concat();

    // Execute
    let (public_values, report) = zkvm.execute(&input)?;
    assert_eq!(public_values, expected_output);
    println!("Execution cycles: {}", report.total_num_cycles);

    // Prove
    let (public_values, proof, report) = zkvm.prove(&input)?;
    assert_eq!(public_values, expected_output);
    println!("Proving time: {:?}", report.proving_time);

    // Verify
    let public_values = zkvm.verify(&proof)?;
    assert_eq!(public_values, expected_output);
    println!("Proof verified successfully!");

    Ok(())
}

Docker-Only Setup

Use Docker for zkVM operations without installing SDKs locally. Only requires Docker to be installed.

1. Create Guest Program

We use the same guest program created above.

2. Create Host

# host/Cargo.toml

[workspace]

[package]
name = "host"
edition = "2024"

[dependencies]
ere-prover-core = { git = "https://github.com/eth-act/ere.git" }
ere-dockerized = { git = "https://github.com/eth-act/ere.git" }

```rust // host/src/main.rs

use ere_compiler_core::Compiler; use ere_dockerized::{ CompilerKind, DockerizedCompiler, DockerizedzkVM, DockerizedzkVMConfig, zkVMKind, }; use ere_prover_core::{Input, ProverResource, zkVMProver}; use std::path::Path;

fn main() -> Result<(), Box> { let guest_directory = Path::new(

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 321
Function 277
Class 159
Enum 37
Interface 9
Struct 2
TypeAlias 1

Languages

Rust98%
Go2%

Modules by API surface

crates/cluster-client/zisk/src/api.rs74 symbols
crates/dockerized/src/util/docker.rs29 symbols
crates/server/api/src/api.rs23 symbols
crates/dockerized/src/prover.rs23 symbols
crates/util/compile/src/rust.rs22 symbols
crates/server/client/src/client.rs19 symbols
crates/prover/openvm/src/prover.rs19 symbols
crates/cluster-client/zisk/src/client.rs19 symbols
crates/prover/airbender/src/prover.rs16 symbols
crates/util/compile/src/error.rs14 symbols
crates/server/cli/src/commands/server.rs14 symbols
crates/prover/sp1/src/prover.rs14 symbols

For agents

$ claude mcp add ere \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page