Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/noir-lang/noir/llms.txt

Use this file to discover all available pages before exploring further.

A proving backend is the component that turns an ACIR circuit into a cryptographic proof. Noir itself is backend-agnostic: it compiles your program to ACIR and stops there. A backend takes that ACIR, generates the witness assignments, and produces (or verifies) a zero-knowledge proof.
Noir does not generate proofs on its own. You always need a proving backend to complete the workflow.

How the workflow fits together

1

Write your Noir program

Author your circuit logic in Noir. Inputs are private by default; mark public inputs with pub.
main.nr
fn main(x: Field, y: pub Field) {
    assert(x != y);
}
2

Compile to ACIR

nargo execute compiles your Noir source to ACIR and generates a witness from your inputs. The compiled artifact is written to ./target/<name>.json and the witness to ./target/witness-name.gz.
nargo execute
3

Feed ACIR to the backend

The proving backend reads the compiled ACIR artifact and the witness, then generates a cryptographic proof. The exact command depends on the backend you choose.
4

Verify the proof

The same backend (or a verifier contract) checks that the proof is valid without learning any private inputs.

Barretenberg (bb)

Barretenberg is the primary proving backend for Noir. It is developed by Aztec and supports:
  • Generating and verifying proofs
  • Recursive proof aggregation
  • Generating Solidity verifier contracts for on-chain verification
  • Inspecting circuit gate counts

Installation

Install bb using the bbup script:
curl -L https://raw.githubusercontent.com/AztecProtocol/aztec-packages/refs/heads/master/barretenberg/bbup/install | bash
bbup
After installation, bb is available on your PATH. See Barretenberg’s Getting Started guide for the current version and full setup instructions.

Key commands

Use bb gates to understand how many gates your circuit uses before generating a proof.
bb gates -b ./target/hello_world.json
You can also check ACIR opcode counts with nargo info before involving the backend:
nargo info
After running nargo execute to produce the witness:
bb prove -b ./target/hello_world.json -w ./target/witness-name.gz -o ./proof
bb verify -k ./target/vk -p ./proof
The verification key (vk) is derived from the circuit. Generate it with bb write_vk.
bb write_solidity_verifier -k ./target/vk -o ./Verifier.sol
Deploy the generated contract to Ethereum to enable on-chain proof verification. See the Solidity verifier guide for more detail.

Other compatible backends

Noir’s ACIR output is backend-agnostic. Any backend that implements the ACVM interface can consume it. The Awesome Noir repository maintains a current list of compatible backends.

Barretenberg

The default backend. PLONKish (UltraPlonk), developed by Aztec. Supports recursive aggregation and Solidity verifier generation.

Awesome Noir backends

Community-maintained list of other backends compatible with Noir’s ACIR output.

The role of ACIR

Noir compiles to ACIR (Abstract Circuit Intermediate Representation) rather than directly to a backend-specific format. This design means:
  • You can swap backends without changing your Noir code.
  • Backend authors only need to implement the ACVM interface, not a full compiler.
  • Noir’s optimizer can improve the ACIR it emits independently of any particular proving system.
See the ACIR concept page for a deeper explanation of the intermediate representation and how backends consume it.

Common operations reference

OperationNargo commandbb command
Compile + executenargo execute
Check circuit sizenargo infobb gates -b <artifact>
Generate proofbb prove -b <artifact> -w <witness>
Write verification keybb write_vk -b <artifact>
Verify proofbb verify -k <vk> -p <proof>
Generate Solidity verifierbb write_solidity_verifier -k <vk>
Run nargo info first to get a quick gate-count estimate before committing to a full proof generation cycle. Smaller circuits prove faster and cost less gas to verify on-chain.

Build docs developers (and LLMs) love