#vm #bytecode #brillig #process #noir #opcode #introduce #non-deterministic #acvm #noir-programs

brillig_vm

The virtual machine that processes Brillig bytecode, used to introduce non-determinism to the ACVM

33 releases (20 breaking)

0.46.0 May 21, 2024
0.44.0 Apr 24, 2024
0.41.0 Mar 11, 2024
0.27.0 Sep 20, 2023
0.21.0 Jul 26, 2023

#1586 in Algorithms

Download history 1/week @ 2026-02-15 200/week @ 2026-03-01 211/week @ 2026-03-08 2/week @ 2026-03-29 25/week @ 2026-04-05 17/week @ 2026-04-12 5/week @ 2026-04-19 18/week @ 2026-04-26 31/week @ 2026-05-03

74 downloads per month
Used in 2 crates (via acvm)

MIT/Apache

550KB
11K SLoC

C++ 6K SLoC Rust 4.5K SLoC // 0.1% comments

Brillig VM

The Brillig VM is a general purpose virtual machine that is designed to execute the Brillig bytecode. It serves as the runtime environment for Brillig, which is a bytecode format used within the Noir ecosystem.

This VM provides a lightweight execution environment for running computational tasks that may be difficult or inefficient to express directly in circuit constraints. This enables Noir programs to perform complex computations outside of the constraint system while still being able to interact with constrained code.

The VM supports various operations including arithmetic operations over fields and integers, memory management, conditional execution, and foreign function calls that can interact with external systems. The VM processes opcodes sequentially, manages memory, and handles control flow, providing the foundation for executing Brillig bytecode generated from Noir programs.

Documentation

For detailed documentation, visit https://noir-lang.github.io/noir/docs/brillig_vm/index.html.

Dependencies

~9MB
~182K SLoC