The main components of the repository are:
Contributor documentation is in docs
and user documentation is in book
.
Benchmark guest programs and benchmark scripts are in openvm-benchmarks
.
Scripts for CI use and metrics post-processing are in ci
.
openvm-prof
: Tools to post-process metrics emitted by the VM for performance profiling.
Command-line binary to compile, execute, and prove guest programs is in cli
.
openvm-sdk
: The developer SDK for the VM. It includes the OpenVM aggregation programs to support continuations for all VMs in the framework, and well as a local aggregation scheduling implementation. It provides the final interface for proving an arbitrary program for a target VM. The SDK includes functionality to generate the final onchain SNARK verifier contract.
openvm
: The OpenVM standard library to be imported by guest programs. Containsmain
function entrypoint and standard intrinsic functions for IO.openvm-platform
: Rust runtime for RV32IM target using OpenVM intrinsic for system termination. This crate is re-exported by theopenvm
crate.openvm-build
: Library of build tools for compiling Rust to the RISC-V target, built on top ofcargo
.openvm-transpiler
: Transpiler for converting RISC-V ELF with custom instructions into OpenVM executable with OpenVM instructions. This crate contains theTranspilerExtension
trait and aTranspiler
struct which supports adding customTranspilerExtension
implementations.openvm-instructions
: OpenVM instruction struct and trait definitions. Also includes some system instruction definitions.openvm-instructions-derive
: Procedural macros to derive traits for OpenVM instructions.openvm-macros-common
: Common library for parsing utilities shared across procedural macros used for custom instruction setup in guest programs.openvm-toolchain-tests
: Includes all official RISC-V 32-bit IM test vectors and transpiler tests. Also, provides utilities for writing integration tests for custom extensions.
openvm-circuit
: The VM circuit framework. It includes the struct and trait definitions used throughout the architecture, as well as the system chips.openvm-circuit-derive
: Procedural macros to derive traits in the VM circuit framework.
openvm-circuit-primitives
: Primitive chips and sub-chips for standalone use in any circuit.openvm-circuit-primitives-derive
: Procedural macros for use in circuit to derive traits.openvm-poseidon2-air
: Standalone poseidon2 AIR implementation which is configurable based on the desired maximum constraint degree.openvm-mod-circuit-builder
: General builder for generating a chip for any modular arithmetic expression for a modulus known at compile time.
examples
: Examples of guest programs using the OpenVM framework. All of the examples can be built and run using the CLI.
The toolchain, ISA, and VM are simultaneously extendable. All non-system functionality is implemented via extensions, which may be moved to standalone repositories in the future but are presently in this repository for maintainer convenience.
openvm-rv32im-circuit
: Circuit extension for RV32IM instructions and IO instructions.openvm-rv32im-transpiler
: Transpiler extension for RV32IM instructions and IO instructions.openvm-rv32im-guest
: Guest library for RV32IM instructions and IO instructions. This is re-exported by theopenvm
crate for convenience.openvm-rv32-adapters
: Circuit adapters for other circuit extensions to use to be compatible with the RISC-V 32-bit architecture.openvm-rv32im-tests
: Integration tests for the RV32IM extension.
openvm-native-circuit
: Circuit extension for native instructions operating on field elements.openvm-native-compiler
: Implementation of compiler from a Rust embedded DSL to OpenVM assembly targeting the native kernel extension. The eDSL also has a static mode to support compilation to a Halo2 circuit.openvm-native-recursion
: Library written in the native eDSL with functions to verify arbitrary STARK proofs. The library also supports compilation to a Halo2 circuit.
openvm-keccak256-circuit
: Circuit extension for thekeccak256
hash function.openvm-keccak256-transpiler
: Transpiler extension for thekeccak256
hash function.openvm-keccak256-guest
: Guest library with intrinsic function for thekeccak256
hash function.openvm-keccak256-tests
: Integration tests for the keccak256 extension.
openvm-bigint-circuit
: Circuit extension forI256
andU256
big integer operations.openvm-bigint-transpiler
: Transpiler extension forI256
andU256
big integer operations.openvm-bigint-guest
: Guest library withI256
andU256
big integers operations using intrinsics for underlying operations.openvm-bigint-tests
: Integration tests for the bigint extension.
openvm-algebra-circuit
: Circuit extension for modular arithmetic for arbitrary compile-time modulus. Supports modular arithmetic and complex field extension operations.openvm-algebra-transpiler
: Transpiler extension for modular arithmetic for arbitrary compile-time modulus. Supports modular arithmetic and complex field extension operations.openvm-algebra-guest
: Guest library with traits for modular arithmetic and complex field extension operations.openvm-algebra-moduli-setup
: Procedural macros for use in guest program to generate modular arithmetic struct with custom intrinsics for compile-time modulus.openvm-algebra-complex-macros
: Procedural macros for use in guest program to generate complex field struct with custom intrinsics for compile-time modulus.openvm-algebra-tests
: Integration tests for the algebra extension.
openvm-ecc-circuit
: Circuit extension for Weierstrass elliptic curve operations for arbitrary compile-time curve.openvm-ecc-transpiler
: Transpiler extension for Weierstrass elliptic curve operations for arbitrary compile-time curve.openvm-ecc-guest
: Guest library with traits for elliptic curve cryptography. Includes implementations of ECDSA and multi-scalar multiplication.openvm-ecc-sw-setup
: Procedural macros for use in guest program to generate short Weierstrass curve struct with custom intrinsics for compile-time curve.openvm-ecc-tests
: Integration tests for the elliptic curve cryptography extension.
openvm-pairing-circuit
: Circuit extension for optimal Ate pairing on BN254 and BLS12-381 curves.openvm-pairing-transpiler
: Transpiler extension for optimal Ate pairing on BN254 and BLS12-381.openvm-pairing-guest
: Guest library with optimal Ate pairing on BN254 and BLS12-381 and associated constants. Also includes elliptic curve operations for VM runtime with thehalo2curves
feature gate.openvm-pairing-tests
: Integration tests for the pairing extension.