This directory is the canonical home for Noir circuits used by the verifier, example contracts, and integration tests.
circuits/
simple_circuit/ Nargo.toml, Prover.toml, src/main.nr, target/
fib_chain/ Nargo.toml, Prover.toml, src/main.nr, target/
tornado/ Nargo.toml, Prover.toml, src/main.nr, target/
scripts/ build_all.sh
Each circuit directory must contain a Nargo.toml. The build scripts discover
those directories automatically and skip anything without a Noir manifest.
Build every circuit, one circuit, or a selected list:
./circuits/scripts/build_all.sh
./circuits/scripts/build_all.sh simple_circuit
./circuits/scripts/build_all.sh simple_circuit fib_chainThe scripts use Noir 1.0.0-beta.9 and Barretenberg 0.87.0, installing them
when missing from PATH.
After a successful build, circuits/<name>/target/ contains:
<project>.jsonand<project>.gzfromnargo compile/nargo executeproofandproof_fields.jsonvkandvk_fields.jsonpublic_inputsandpublic_inputs_fields.json
- Create
circuits/<name>/src/main.nr. - Add
circuits/<name>/Nargo.toml. - Add or generate
circuits/<name>/Prover.toml. - Run
./circuits/scripts/build_all.sh <name>. - Point tests or example contracts at
circuits/<name>/target/.
For tornado, the build script regenerates Prover.toml through contracts/tornado_classic/contracts/examples/populate_publics.rs by default.
Set GENERATE_PROVER=0 to keep existing prover inputs.