0xMiden/miden-vm

STARK-based virtual machine

Rust

778

6,170 commits

updated Oct 17, 2026

See the code

README

Miden Virtual Machine

LICENSE LICENSE Test Build RUST_VERSION Crates.io

Miden VM is a zero-knowledge virtual machine written in Rust.

Overview

You can execute a program on Miden VM and generate a STARK proof of its execution. Anyone can verify the proof without executing the program again or knowing its source code.

The prover uses the lifted STARK protocol with components from Plonky3.

For usage examples and the Rust API, see the miden-vm crate. The documentation covers the VM design and programming model.

Branches and releases

Until the 1.0 release, development takes place on the following branches:

BranchRelease in development
mainMinor release 0.36.
release/v0.35.1Patch release 0.35.1.
nextMajor release 1.0.

After the 1.0 release, main will be the release branch and next will be the development branch. Use a release tag when you need a specific published version.

Changes to VM internals and public interfaces can require changes in programs that use Miden VM. Each branch has a CHANGELOG.md with its release history and unreleased changes. See Contributing for the contribution workflow.

Features

Miden VM supports general computation and proof generation with the following capabilities.

Programming model

  • Programs can use conditional branches and loops.
  • Programs can call procedures and execute them in isolated contexts with separate memory. Kernel procedures provide controlled access to the root context.
  • Programs can read and write memory, including local memory reserved for individual procedures.
  • Programs can use native 32-bit integer operations and Eidos hashing, including Merkle path verification.
  • Programs can use Eidos AEAD streaming.
  • Programs can use code from external libraries. The core library includes operations on 64-bit integers and cryptographic routines.

Miden Assembly is the language for Miden VM programs. The assembly reference describes the instructions. See the assembler documentation for parsing APIs and compilation into executable packages.

Hosts and private inputs

Hosts can supply private inputs and computation hints through the advice provider. Programs must verify advice values to establish their correctness.

Precompiles

Programs can defer computations to the host. The VM proof commits to the deferred claims. To complete verification, you must also verify a precompile proof for those claims. See the deferred proof lifecycle for completion and verification requirements.

The precompile VM proves deferred claims with specialized circuits. The precompiles support Keccak-256, SHA-256 and SHA-512 hashing. They also support 256-bit integer arithmetic and elliptic curve operations. The core library uses these operations for secp256k1 ECDSA verification and public key recovery.

Recursive verification

Programs can verify VM proofs and precompile VM proofs with the core library's recursive verifiers. See sys::vm and sys::pvm for their requirements.

Execution and platforms

You can use the fast processor to execute programs without generating a proof. Developers can use processor APIs to step through execution and retain source locations, including inlined calls. Programs can also print VM state through the core library's debug procedures.

Miden VM supports WebAssembly builds without Rust's standard library (no_std). The supported no_std targets are wasm32-unknown-unknown and wasm32-wasip1. Use Cargo's --no-default-features flag for these builds.

The workspace Cargo configuration enables SIMD128 instructions for wasm32-unknown-unknown with -C target-feature=+simd128. These instructions accelerate hashing in the Plonky3 backend. Cargo applies this configuration only when you build from this workspace or a directory inside it. When you use Miden VM as a dependency, set the same flag in your own Cargo configuration or RUSTFLAGS.

Enable the concurrent feature to generate STARK proofs with multiple threads. The prover uses Rayon for parallel computation. Set RAYON_NUM_THREADS to control the number of worker threads. See the benchmarks for measured performance.

Project structure

The workspace contains the main crates below. Internal support and benchmark crates are omitted.

AreaCratePurpose
VMcoreDefines the instruction set and shared VM types.
VMassemblyParses and assembles Miden Assembly programs.
VMprocessorExecutes programs and builds execution traces.
VMairDefines the constraints checked for VM execution.
VMproverProduces STARK proofs from execution traces.
VMverifierVerifies VM execution proofs.
VMmiden-vmProvides the main library and command line interface.
Shared codefieldProvides a common field element type for Miden Rust code.
Shared codecryptoProvides the cryptographic primitives used across the workspace.
Proof systemlifted-airDefines AIR traits and symbolic constraints for the lifted STARK protocol.
Proof systemlifted-starkImplements lifted STARK proving and verification.
Proof systemstark-transcriptProvides transcript channels used by proof protocols.
Proof systemconstraint-compilerCompiles symbolic AIR constraints into evaluator code.
PrecompilesprecompilesDefines deferred computations and the precompile registry.
Precompilesprecompiles-airDefines precompile AIRs and common proof setup.
Precompilesprecompiles-proverBuilds precompile proof data during proving.
Precompilesprecompiles-verifierVerifies precompile proofs.
Packages and toolscore-libProvides the standard Miden Assembly library.
Packages and toolsmast-packageStores compiled MAST artifacts with their dependencies and exports.
Packages and toolsprojectLoads and builds Miden projects.
Packages and toolspackage-registryDefines package registry and dependency resolution interfaces.
Packages and toolspackage-registry-localProvides a local package registry and its command line interface.
Packages and toolsmiden-formatFormats Miden Assembly source files.

Documentation

The miden-docs repository imports the Markdown from docs/src for the published documentation website. You can build a local preview with Docusaurus. See the docs setup instructions.

Performance

These benchmarks use Eidos, Miden VM's native hash function, for STARK proof generation. The resulting proofs are therefore recursion-friendly: they can be efficiently verified inside Miden VM.

Execution measures the fast interpreter; proving includes trace generation after witness construction. RAM consumed is peak process memory. See the performance guide.

To reproduce the multi-core results:

cargo build --locked --profile optimized -p miden-vm-blake3-bench --bin vm-performance
target/optimized/vm-performance --hash eidos --threads 14 --iterations 128 --samples 5

Single-core prover performance

The VM executes the Blake3 example program on an Apple M4 Pro with one Rayon worker. The rows measure chains of 2, 8, 32, and 128 Blake3 calls, with VM cycles padded to a power of two. The default proof parameters target 96-bit conjectured security. See the Eidos security and usage guide.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2143.00 ms1.04 sec0.60 GiB154.4 KiB
2162.95 ms2.42 sec0.79 GiB154.2 KiB
2183.97 ms9.02 sec1.91 GiB173.1 KiB
2207.68 ms38.92 sec6.46 GiB192.0 KiB

The Apple M5 Max results use one Rayon worker. Timings and proof sizes are medians of five samples after one warmup proof.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2142.63 ms0.92 sec0.65 GiB154.4 KiB
2162.75 ms2.13 sec1.35 GiB154.2 KiB
2183.18 ms7.48 sec2.25 GiB173.1 KiB
2205.21 ms30.01 sec6.93 GiB192.0 KiB

The AMD Ryzen 9 9950X results use one Rayon worker. Ryzen timings and proof sizes are medians of five samples.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2145.99 ms0.95 sec0.37 GiB154.4 KiB
2166.29 ms2.30 sec0.54 GiB154.2 KiB
2186.87 ms8.46 sec1.59 GiB173.1 KiB
2209.04 ms33.78 sec5.66 GiB192.0 KiB

Multi-core prover performance

The following runs use 128 Blake3 calls (828,632 VM cycles, padded to 220).

MachineExecution timeProving timeExecution %Implied Frequency
Apple M1 Pro (12 threads)9.4 ms7.75 sec0.12%135 KHz
Apple M4 Pro (14 threads)6.3 ms4.36 sec0.14%240 KHz
Apple M4 Max (16 threads)5.9 ms2.97 sec0.20%353 KHz
Apple M5 Max (18 threads)5.8 ms2.69 sec0.22%390 KHz
Amazon Graviton 4 (64 threads)
AMD EPYC 9R45 (64 threads)
AMD Ryzen 9 9950X (16 threads)9.7 ms3.78 sec0.26%277 KHz
AMD Ryzen 9 9950X (32 threads)9.5 ms3.83 sec0.25%274 KHz

Execution % is execution time divided by proving time. Implied frequency is the padded VM cycle count (220 for these runs) divided by proving time, reported in KHz.

References

Miden VM uses STARK proofs to establish that a computation was executed correctly. Eli Ben-Sasson and Michael Riabzev developed STARKs with their coauthors at Technion (Israel Institute of Technology). STARKs require no trusted setup and rely on few cryptographic assumptions.

Here are some resources to learn more about STARKs:

Vitalik Buterin's blog series on zk-STARKs:

Alan Szepieniec's STARK tutorials:

StarkWare's STARK Math blog series:

StarkWare's STARK tutorial:

Licensing

Any contribution intentionally submitted for inclusion in this repository, as defined in the Apache-2.0 license, shall be dual licensed under the MIT and Apache 2.0 licenses, without any additional terms or conditions.

cryptography
stark
virtual-machine
zero-knowledge

0xMiden/miden-vm

STARK-based virtual machine

Rust

778

6,170 commits

updated Oct 17, 2026

See the code

README

Miden Virtual Machine

LICENSE LICENSE Test Build RUST_VERSION Crates.io

Miden VM is a zero-knowledge virtual machine written in Rust.

Overview

You can execute a program on Miden VM and generate a STARK proof of its execution. Anyone can verify the proof without executing the program again or knowing its source code.

The prover uses the lifted STARK protocol with components from Plonky3.

For usage examples and the Rust API, see the miden-vm crate. The documentation covers the VM design and programming model.

Branches and releases

Until the 1.0 release, development takes place on the following branches:

BranchRelease in development
mainMinor release 0.36.
release/v0.35.1Patch release 0.35.1.
nextMajor release 1.0.

After the 1.0 release, main will be the release branch and next will be the development branch. Use a release tag when you need a specific published version.

Changes to VM internals and public interfaces can require changes in programs that use Miden VM. Each branch has a CHANGELOG.md with its release history and unreleased changes. See Contributing for the contribution workflow.

Features

Miden VM supports general computation and proof generation with the following capabilities.

Programming model

  • Programs can use conditional branches and loops.
  • Programs can call procedures and execute them in isolated contexts with separate memory. Kernel procedures provide controlled access to the root context.
  • Programs can read and write memory, including local memory reserved for individual procedures.
  • Programs can use native 32-bit integer operations and Eidos hashing, including Merkle path verification.
  • Programs can use Eidos AEAD streaming.
  • Programs can use code from external libraries. The core library includes operations on 64-bit integers and cryptographic routines.

Miden Assembly is the language for Miden VM programs. The assembly reference describes the instructions. See the assembler documentation for parsing APIs and compilation into executable packages.

Hosts and private inputs

Hosts can supply private inputs and computation hints through the advice provider. Programs must verify advice values to establish their correctness.

Precompiles

Programs can defer computations to the host. The VM proof commits to the deferred claims. To complete verification, you must also verify a precompile proof for those claims. See the deferred proof lifecycle for completion and verification requirements.

The precompile VM proves deferred claims with specialized circuits. The precompiles support Keccak-256, SHA-256 and SHA-512 hashing. They also support 256-bit integer arithmetic and elliptic curve operations. The core library uses these operations for secp256k1 ECDSA verification and public key recovery.

Recursive verification

Programs can verify VM proofs and precompile VM proofs with the core library's recursive verifiers. See sys::vm and sys::pvm for their requirements.

Execution and platforms

You can use the fast processor to execute programs without generating a proof. Developers can use processor APIs to step through execution and retain source locations, including inlined calls. Programs can also print VM state through the core library's debug procedures.

Miden VM supports WebAssembly builds without Rust's standard library (no_std). The supported no_std targets are wasm32-unknown-unknown and wasm32-wasip1. Use Cargo's --no-default-features flag for these builds.

The workspace Cargo configuration enables SIMD128 instructions for wasm32-unknown-unknown with -C target-feature=+simd128. These instructions accelerate hashing in the Plonky3 backend. Cargo applies this configuration only when you build from this workspace or a directory inside it. When you use Miden VM as a dependency, set the same flag in your own Cargo configuration or RUSTFLAGS.

Enable the concurrent feature to generate STARK proofs with multiple threads. The prover uses Rayon for parallel computation. Set RAYON_NUM_THREADS to control the number of worker threads. See the benchmarks for measured performance.

Project structure

The workspace contains the main crates below. Internal support and benchmark crates are omitted.

AreaCratePurpose
VMcoreDefines the instruction set and shared VM types.
VMassemblyParses and assembles Miden Assembly programs.
VMprocessorExecutes programs and builds execution traces.
VMairDefines the constraints checked for VM execution.
VMproverProduces STARK proofs from execution traces.
VMverifierVerifies VM execution proofs.
VMmiden-vmProvides the main library and command line interface.
Shared codefieldProvides a common field element type for Miden Rust code.
Shared codecryptoProvides the cryptographic primitives used across the workspace.
Proof systemlifted-airDefines AIR traits and symbolic constraints for the lifted STARK protocol.
Proof systemlifted-starkImplements lifted STARK proving and verification.
Proof systemstark-transcriptProvides transcript channels used by proof protocols.
Proof systemconstraint-compilerCompiles symbolic AIR constraints into evaluator code.
PrecompilesprecompilesDefines deferred computations and the precompile registry.
Precompilesprecompiles-airDefines precompile AIRs and common proof setup.
Precompilesprecompiles-proverBuilds precompile proof data during proving.
Precompilesprecompiles-verifierVerifies precompile proofs.
Packages and toolscore-libProvides the standard Miden Assembly library.
Packages and toolsmast-packageStores compiled MAST artifacts with their dependencies and exports.
Packages and toolsprojectLoads and builds Miden projects.
Packages and toolspackage-registryDefines package registry and dependency resolution interfaces.
Packages and toolspackage-registry-localProvides a local package registry and its command line interface.
Packages and toolsmiden-formatFormats Miden Assembly source files.

Documentation

The miden-docs repository imports the Markdown from docs/src for the published documentation website. You can build a local preview with Docusaurus. See the docs setup instructions.

Performance

These benchmarks use Eidos, Miden VM's native hash function, for STARK proof generation. The resulting proofs are therefore recursion-friendly: they can be efficiently verified inside Miden VM.

Execution measures the fast interpreter; proving includes trace generation after witness construction. RAM consumed is peak process memory. See the performance guide.

To reproduce the multi-core results:

cargo build --locked --profile optimized -p miden-vm-blake3-bench --bin vm-performance
target/optimized/vm-performance --hash eidos --threads 14 --iterations 128 --samples 5

Single-core prover performance

The VM executes the Blake3 example program on an Apple M4 Pro with one Rayon worker. The rows measure chains of 2, 8, 32, and 128 Blake3 calls, with VM cycles padded to a power of two. The default proof parameters target 96-bit conjectured security. See the Eidos security and usage guide.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2143.00 ms1.04 sec0.60 GiB154.4 KiB
2162.95 ms2.42 sec0.79 GiB154.2 KiB
2183.97 ms9.02 sec1.91 GiB173.1 KiB
2207.68 ms38.92 sec6.46 GiB192.0 KiB

The Apple M5 Max results use one Rayon worker. Timings and proof sizes are medians of five samples after one warmup proof.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2142.63 ms0.92 sec0.65 GiB154.4 KiB
2162.75 ms2.13 sec1.35 GiB154.2 KiB
2183.18 ms7.48 sec2.25 GiB173.1 KiB
2205.21 ms30.01 sec6.93 GiB192.0 KiB

The AMD Ryzen 9 9950X results use one Rayon worker. Ryzen timings and proof sizes are medians of five samples.

Padded VM cyclesExecution timeProving timeRAM consumedProof size
2145.99 ms0.95 sec0.37 GiB154.4 KiB
2166.29 ms2.30 sec0.54 GiB154.2 KiB
2186.87 ms8.46 sec1.59 GiB173.1 KiB
2209.04 ms33.78 sec5.66 GiB192.0 KiB

Multi-core prover performance

The following runs use 128 Blake3 calls (828,632 VM cycles, padded to 220).

MachineExecution timeProving timeExecution %Implied Frequency
Apple M1 Pro (12 threads)9.4 ms7.75 sec0.12%135 KHz
Apple M4 Pro (14 threads)6.3 ms4.36 sec0.14%240 KHz
Apple M4 Max (16 threads)5.9 ms2.97 sec0.20%353 KHz
Apple M5 Max (18 threads)5.8 ms2.69 sec0.22%390 KHz
Amazon Graviton 4 (64 threads)
AMD EPYC 9R45 (64 threads)
AMD Ryzen 9 9950X (16 threads)9.7 ms3.78 sec0.26%277 KHz
AMD Ryzen 9 9950X (32 threads)9.5 ms3.83 sec0.25%274 KHz

Execution % is execution time divided by proving time. Implied frequency is the padded VM cycle count (220 for these runs) divided by proving time, reported in KHz.

References

Miden VM uses STARK proofs to establish that a computation was executed correctly. Eli Ben-Sasson and Michael Riabzev developed STARKs with their coauthors at Technion (Israel Institute of Technology). STARKs require no trusted setup and rely on few cryptographic assumptions.

Here are some resources to learn more about STARKs:

Vitalik Buterin's blog series on zk-STARKs:

Alan Szepieniec's STARK tutorials:

StarkWare's STARK Math blog series:

StarkWare's STARK tutorial:

Licensing

Any contribution intentionally submitted for inclusion in this repository, as defined in the Apache-2.0 license, shall be dual licensed under the MIT and Apache 2.0 licenses, without any additional terms or conditions.

cryptography
stark
virtual-machine
zero-knowledge

Project health

crates.io

Latest release

0.36.1 · Oct 16, 2026

Releases this year

52

Significant stargazers

Jovi De Croock

772 followers · starred Nov 2021

Guillaume Claret

352 followers · starred Aug 2025

Boris Nagaev

159 followers · starred Dec 2025

Marco Munizaga

253 followers · starred Jan 2022