Skip to content

Examples catalog

The v1.0.2 examples are the circuits available with this documentation’s release. Use the Quickstart for the smallest proof flow, or the Tutorial to make a circuit with a public commitment and verify it from Rust.

Each package below includes Nargo.toml and Prover.toml. From a v1.0.2 source checkout, run:

Terminal window
cd noir-examples/<name>
cargo run --release --bin provekit-cli -- prepare
cargo run --release --bin provekit-cli -- prove
cargo run --release --bin provekit-cli -- verify

These flows completed prepare, prove, and verify against the v1.0.2 tag on macOS ARM64:

ExampleWhat it demonstrates
basicPoseidon2 BN254 permutation with private inputs; the smallest checked-in circuit.
basic-2, basic-3, basic-4Small arithmetic circuits used as compiler regression cases.
poseidon2, poseidon-varPoseidon2 circuits with different input shapes.
poseidon-roundsRepeated Poseidon2 permutation rounds used in benchmarking.
p256_bigcurveP-256 verification via the zkpassport/noir_bigcurve representation.
zkchaseState transitions and rules in a small game-like circuit.

Included examples that do not complete the flow

Section titled “Included examples that do not complete the flow”

The v1.0.2 tag also contains the following packages. They are useful as source references, but do not follow the three-command recipe above:

ExampleObserved v1.0.2 limitation
sha256No checked-in Prover.toml for the default prove command.
noir_sha256prepare passes; prove panics in calculate_external_row_of_r1cs_matrices.
p256_stdprepare panics on the unsupported ECDSA_SECP256R1 black box.
oprfprepare fails with no builder for public input ACIR index 10.

These are libraries or multi-package workspaces rather than single circuits for the three-command recipe:

ExampleShapeWhat it demonstrates
babyjubjubLibraryBaby Jubjub curve operations.
eddsa_poseidon2LibraryEdDSA verification using Poseidon2.
partial_sha256, noir-native-sha256LibrariesSHA-256 building blocks.
noir-passport, noir-passport-monolithicWorkspacesPassport-style credential circuits and utilities.
noir-r1cs-test-programsTest programsNoir features used by the R1CS compiler test harness.

A runnable package contains Nargo.toml, Prover.toml, and src/main.nr. After verification, inspect its public inputs:

Terminal window
cargo run --release --bin provekit-cli -- show-inputs --hex \
<example>.pkv \
proof.np

The basic example has no public input; show-inputs prints an empty list. The tutorial’s secret_knowledge circuit marks commitment public and shows its value in this output.