Generate artifacts
Use this guide when you need reproducible artifact paths for tests, demos, CI jobs, release bundles, or downstream integrations.
Default artifact flow
Section titled “Default artifact flow”From noir-examples/basic:
cargo run --release --bin provekit-cli -- preparecargo run --release --bin provekit-cli -- provecargo run --release --bin provekit-cli -- verifyThis writes:
| File | Created by | Consumed by |
|---|---|---|
basic.pkp | prepare | prove, generate-gnark-inputs |
basic.pkv | prepare | verify, show-inputs |
proof.np | prove | verify, show-inputs, generate-gnark-inputs |
target/basic.json | Noir compilation during prepare | ProveKit internals and inspection workflows |
Explicit artifact directory
Section titled “Explicit artifact directory”-
Enter the Noir package and create an output directory.
Terminal window cd noir-examples/basicmkdir -p artifacts -
Prepare key material.
Terminal window cargo run --release --bin provekit-cli -- prepare . \--pkp ./artifacts/basic.pkp \--pkv ./artifacts/basic.pkv -
Generate a proof.
Terminal window cargo run --release --bin provekit-cli -- prove \--prover ./artifacts/basic.pkp \--input ./Prover.toml \--out ./artifacts/proof.np -
Verify the proof.
Terminal window cargo run --release --bin provekit-cli -- verify \--verifier ./artifacts/basic.pkv \--proof ./artifacts/proof.np
Release compatibility
Section titled “Release compatibility”Generate the prover key, verifier key, proof, and recursive-verifier exports with the same v1.0.2 release. The v1.0.2 CLI has no prepare --hash option. If you change the release or circuit, regenerate the entire artifact set.
Inspect public inputs
Section titled “Inspect public inputs”Decode public inputs as part of integration testing:
cargo run --release --bin provekit-cli -- show-inputs --hex \ ./artifacts/basic.pkv \ ./artifacts/proof.npReview the output with the application owner. Verification proves the proof is valid for the verifier key, your application still owns the decision about whether those inputs authorize the requested action.
Recursive-verifier export
Section titled “Recursive-verifier export”After the proof verifies, export inputs for the Go/gnark recursive verifier:
cargo run --release --bin provekit-cli -- generate-gnark-inputs \ ./artifacts/basic.pkp \ ./artifacts/proof.np \ --params ./artifacts/params_for_recursive_verifier \ --r1cs ./artifacts/r1cs.jsonThe command reads the prover key and proof, then writes the recursive parameters and an R1CS JSON. Keep those outputs paired with the exact basic.pkp and proof.np that produced them.
CI evidence template
Section titled “CI evidence template”A release-producing CI job should persist at least:
commit: <git sha>rust-toolchain: <contents of rust-toolchain.toml>lockfile: Cargo.lockcompiler: noircommands: - cargo run --release --bin provekit-cli -- prepare ... - cargo run --release --bin provekit-cli -- prove ... - cargo run --release --bin provekit-cli -- verify ...artifacts: - artifacts/basic.pkp <checksum> - artifacts/basic.pkv <checksum> - artifacts/proof.np <checksum>Cleanup
Section titled “Cleanup”rm -rf artifacts target basic.pkp basic.pkv proof.np params_for_recursive_verifier r1cs.json