#nix-flake #path #command


An ACVM backend which allows proving/verifying ACIR circuits against Aztec Lab's Barretenberg library

16 releases (breaking)

0.12.0 Aug 30, 2023
0.10.1 Aug 18, 2023
0.10.0 Jul 26, 2023

#439 in Filesystem

Download history 470/week @ 2023-07-29 941/week @ 2023-08-05 1110/week @ 2023-08-12 1326/week @ 2023-08-19 911/week @ 2023-08-26 107/week @ 2023-09-02 88/week @ 2023-09-09 58/week @ 2023-09-16 37/week @ 2023-09-23 22/week @ 2023-09-30 10/week @ 2023-10-07 13/week @ 2023-10-14 28/week @ 2023-10-21 25/week @ 2023-10-28 6/week @ 2023-11-04 7/week @ 2023-11-11

66 downloads per month


2.5K SLoC

Solidity 1.5K SLoC // 0.3% comments Rust 744 SLoC // 0.1% comments


An ACVM backend which allows proving/verifying ACIR circuits against Aztec Lab's Barretenberg library.

Verifier contract repository

The verifier contracts generated by this library are developed in https://github.com/AztecProtocol/aztec-verifier-contracts. As such, we cannot accept any modifications to the contracts directly and any changes to the contracts must first be made and accepted in the upstream repository.

Working on this project

Due to the large number of native dependencies, this project uses Nix and direnv to streamline the development experience.

Setting up your environment

For the best experience, please follow these instructions to setup your environment:

  1. Install Nix following their guide for your operating system
  2. Create the file ~/.config/nix/nix.conf with the contents:
experimental-features = nix-command
extra-experimental-features = flakes
  1. Install direnv into your Nix profile by running:
nix profile install nixpkgs#direnv
  1. Add direnv to your shell following their guide
  2. Restart your shell

Shell & editor experience

Now that your environment is set up, you can get to work on the project.

  1. Clone the repository, such as:
git clone git@github.com:noir-lang/aztec_backend
  1. Navigate to the directory:
cd aztec_backend
  1. You should see a direnv error because projects aren't allowed by default. Make sure you've reviewed and trust our .envrc file, then you need to run:
direnv allow
  1. Now, wait awhile for all the native dependencies to be built. This will take some time and direnv will warn you that it is taking a long time, but we just need to let it run.
  2. Once you are presented with your prompt again, you can start your editor within the project directory (we recommend VSCode):
code .
  1. (Recommended) When launching VSCode for the first time, you should be prompted to install our recommended plugins. We highly recommend installing these for the best development experience.

Building and testing

Assuming you are using direnv to populate your environment, building and testing the project can be done with the typical cargo build, cargo test, and cargo clippy commands. You'll notice that the cargo version matches the version we specify in flake.nix, which is 1.66.0 at the time of this writing.

If you want to build the entire project in an isolated sandbox, you can use Nix commands:

  1. nix build . (or nix build . -L for verbose output) to build the project in a Nix sandbox
  2. nix flake check (or nix flake check -L for verbose output) to run clippy and tests in a Nix sandbox

Building against a different local/remote version of Barretenberg

If you are working on this project and want a different version of Barretenberg (instead of the version this project is pinned against), you'll want to replace the lockfile version with your version. This can be done by running:

nix flake lock --override-input barretenberg /absolute/path/to/your/barretenberg

You can also point at a fork and/or branch on GitHub using:

nix flake lock --override-input barretenberg github:username/barretenberg/branch_name

Note: You don't want to commit the updated lockfile, as it will fail in CI!

Without direnv

If you have hesitations with using direnv, you can launch a subshell with nix develop and then launch your editor from within the subshell. However, if VSCode was already launched in the project directory, the environment won't be updated.

Advanced: If you aren't using direnv nor launching your editor within the subshell, you can try to install Barretenberg and other global dependencies the package needs. This is an advanced workflow and likely won't receive support!


~465K SLoC