A complete step-by-step guide to install Noir, Barretenberg, and all dependencies on macOS and Windows for beginners.
- Prerequisites
- macOS Installation
- Windows Installation
- Generating Boilerplate Code
- Barretenberg Setup
- Verification of Installation
- Troubleshooting
Before starting, ensure you have:
- Administrator/Sudo Access: Required for system-level installations
- Internet Connection: For downloading packages and dependencies
- Disk Space: At least 2GB free space
- Terminal/Command Line: Basic command-line knowledge
- macOS Version: 10.13 or later
- Processor: Intel or Apple Silicon (M1/M2/M3)
- RAM: Minimum 8GB (16GB recommended)
- Disk Space: 2GB minimum
What is Homebrew? Homebrew is a package manager for macOS that simplifies software installation.
Installation:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Verify Installation:
brew --versionExpected output:
Homebrew 4.x.x
What is Rust? Rust is a systems programming language required to build and compile Noir.
Installation using Rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shDuring installation, select option 1 (Proceed with installation).
Configure Current Shell:
source $HOME/.cargo/envVerify Installation:
rustc --version
cargo --versionExpected output:
rustc 1.73.0 (or later)
cargo 1.73.0 (or later)
What is Nargo? Nargo is the command-line tool for Noir that handles compilation, execution, and circuit management.
Installation using Noirup:
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bashReload Shell Configuration:
source ~/.zshrcOr if using bash:
source ~/.bash_profileVerify Installation:
nargo --versionExpected output:
nargo version = X.X.X
What is Node.js? Node.js is needed for JavaScript integration and some development tools.
Installation using Homebrew:
brew install nodeVerify Installation:
node --version
npm --versionExpected output:
v18.x.x (or later)
8.x.x (or later)
What is Barretenberg? Barretenberg is the cryptographic backend that generates and verifies zero knowledge proofs from Noir circuits.
Installation using Homebrew:
brew tap barretenberg/barretenberg https://github.com/AztecProtocol/barretenberg.git
brew install barretenbergFor Apple Silicon (M1/M2/M3) Macs:
If the Homebrew installation fails, use prebuilt binaries:
# Download prebuilt binary
curl -L https://github.com/AztecProtocol/barretenberg/releases/download/v0.21.0/barretenberg-x86_64-apple-darwin.tar.gz -o barretenberg.tar.gz
# Extract
tar -xzf barretenberg.tar.gz
# Move to PATH
sudo mv barretenberg/bin/bb /usr/local/bin/
# Verify
bb --versionVerify Installation:
bb --versionExpected output:
Barretenberg version 0.21.0 (or later)
Run the following command to verify all components:
echo "=== macOS Installation Verification ===" && \
echo "Rust: $(rustc --version)" && \
echo "Cargo: $(cargo --version)" && \
echo "Nargo: $(nargo --version)" && \
echo "Node.js: $(node --version)" && \
echo "npm: $(npm --version)" && \
echo "Barretenberg: $(bb --version)"All commands should return version information without errors.
- Windows Version: Windows 10 or Windows 11
- Processor: Any modern processor
- RAM: Minimum 8GB (16GB recommended)
- Disk Space: 2GB minimum
What are Build Tools? Visual Studio Build Tools provide necessary C++ compilation tools for Rust and other dependencies.
Download & Install:
- Visit: https://visualstudio.microsoft.com/downloads/
- Click "All Downloads" → "Visual Studio Build Tools"
- Download and run installer
- Select "Desktop development with C++"
- Click "Install"
Verification:
Open Command Prompt and verify installation completed successfully.
Installation using Rustup:
- Visit: https://www.rust-lang.org/tools/install
- Click "Download RUSTUP-INIT.EXE"
- Run the downloaded file
- When prompted, press
1and then Enter to proceed with installation
Open New Command Prompt (to reload environment variables):
rustc --version
cargo --versionExpected output:
rustc 1.73.0 (or later)
cargo 1.73.0 (or later)
Installation using Noirup:
Open PowerShell (Windows PowerShell, not Command Prompt) and run:
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bashIf you don't have curl, first install it or download using a browser.
Alternative Method (if curl fails):
Download from: https://github.com/noir-lang/noir/releases
Extract and add to PATH manually.
Open New PowerShell (to reload environment variables):
nargo --versionExpected output:
nargo version = X.X.X
Installation using Installer:
- Visit: https://nodejs.org/
- Download LTS version (e.g., 18.x or 20.x)
- Run installer and follow default options
- Restart Command Prompt after installation
Verify Installation:
node --version
npm --versionExpected output:
v18.x.x (or later)
8.x.x (or later)
Installation Method 1: Using Git (Recommended)
- Install Git for Windows: https://git-scm.com/download/win
- Clone Barretenberg repository:
git clone https://github.com/AztecProtocol/barretenberg.git
cd barretenberg- Build using CMake:
mkdir build
cd build
cmake ..
cmake --build . --config ReleaseInstallation Method 2: Using Pre-built Binaries
- Visit: https://github.com/AztecProtocol/barretenberg/releases
- Download latest
bb-windows.exe - Save to a folder, e.g.,
C:\barretenberg\ - Add to system PATH:
- Right-click "This PC" → Properties
- Click "Advanced system settings"
- Click "Environment Variables"
- Under "System variables", click "Path" → "Edit"
- Click "New" and add
C:\barretenberg\ - Click OK and restart Command Prompt
Verify Installation:
bb --versionExpected output:
Barretenberg version 0.21.0 (or later)
Open Command Prompt and run:
echo === Windows Installation Verification === && ^
rustc --version && ^
cargo --version && ^
nargo --version && ^
node --version && ^
npm --version && ^
bb --versionAll commands should return version information without errors.
Command (both macOS and Windows):
nargo new my_first_circuit
cd my_first_circuitGenerated Structure:
my_first_circuit/
├── Nargo.toml # Project manifest
├── Prover.toml # Input values template
└── src/
└── main.nr # Main circuit file
[package]
name = "my_first_circuit"
type = "bin"
authors = ["Your Name"]
compiler_version = "0.21.0"
[dependencies]
# Add dependencies here as needed
# Example: std = { git = "https://github.com/noir-lang/std", tag = "v0.21.0" }Default Boilerplate:
fn main(x : Field, y : Field) {
assert(x == y);
}
#[test]
fn test_example() {
main(1, 1);
}x = "1"
y = "2"Barretenberg is a high-performance proving system that:
- Compiles Noir circuits into proofs
- Generates verification keys
- Creates zero knowledge proofs
- Verifies proofs cryptographically
Barretenberg
├── ACIR Compiler: Converts Noir to arithmetic circuits
├── Prover: Generates proofs from circuits + witnesses
├── Verifier: Validates proofs
└── Backend: Ultra-Honk proving scheme (default)
bb write_vk -b ./target/simple_circuit.json -o ./targetParameters:
-b: Path to compiled circuit bytecode-o: Output directory for verification key
Output:
vkfile: Verification key for proof validation
bb prove -b ./target/simple_circuit.json -w ./target/simple_circuit.gz -o ./targetParameters:
-b: Path to compiled circuit bytecode-w: Path to witness file-o: Output directory for proof
Output:
proof: Generated zero knowledge proofpublic_inputs: Public inputs used in proof
bb verify -k ./target/vk -p ./target/proofParameters:
-k: Path to verification key-p: Path to proof
Output:
- Success/Failure message
Step 1: Compile with Nargo
nargo compileStep 2: Execute to Generate Witness
nargo executeStep 3: Generate Verification Key
bb write_vk -b ./target/simple_circuit.json -o ./targetStep 4: Create Proof
bb prove -b ./target/simple_circuit.json -w ./target/simple_circuit.gz -o ./targetStep 5: Verify Proof
bb verify -k ./target/vk -p ./target/proofCreate a file called verify_installation.sh:
#!/bin/bash
echo "╔════════════════════════════════════════════════════════════╗"
echo "║ Noir & Barretenberg Installation Verification ║"
echo "╚════════════════════════════════════════════════════════════╝"
echo ""
echo "✓ Checking Rust..."
rustc --version || echo "✗ Rust not found"
cargo --version || echo "✗ Cargo not found"
echo ""
echo "✓ Checking Noir..."
nargo --version || echo "✗ Nargo not found"
echo ""
echo "✓ Checking Node.js..."
node --version || echo "✗ Node.js not found"
npm --version || echo "✗ npm not found"
echo ""
echo "✓ Checking Barretenberg..."
bb --version || echo "✗ Barretenberg not found"
echo ""
echo "✓ Checking environment variables..."
echo "PATH: $PATH"
echo ""
echo "✓ Testing Nargo new project..."
if command -v nargo &> /dev/null; then
nargo new test_circuit 2>/dev/null
if [ -f "test_circuit/src/main.nr" ]; then
echo "✓ Nargo project creation successful"
rm -rf test_circuit
else
echo "✗ Nargo project creation failed"
fi
fiRun it:
chmod +x verify_installation.sh
./verify_installation.shCreate a file called verify_installation.bat:
@echo off
setlocal enabledelayedexpansion
echo ════════════════════════════════════════════════════════════
echo Noir ^& Barretenberg Installation Verification
echo ════════════════════════════════════════════════════════════
echo.
echo ✓ Checking Rust...
rustc --version || echo ✗ Rust not found
cargo --version || echo ✗ Cargo not found
echo.
echo ✓ Checking Noir...
nargo --version || echo ✗ Nargo not found
echo.
echo ✓ Checking Node.js...
node --version || echo ✗ Node.js not found
npm --version || echo ✗ npm not found
echo.
echo ✓ Checking Barretenberg...
bb --version || echo ✗ Barretenberg not found
echo.
echo ✓ Verification complete!
pauseRun it by double-clicking or:
verify_installation.batmacOS:
# Reload shell configuration
source ~/.zshrc
# or
source ~/.bash_profile
# Manually add to PATH
export PATH="$PATH:$HOME/.nargo/bin"Windows:
- Restart Command Prompt or PowerShell
- Check if C:\Users\YourUsername.nargo\bin is in System PATH
- If not, manually add it
macOS:
# Check if Barretenberg is installed
which bb
# If not found, try manual installation
cd /tmp
curl -L https://github.com/AztecProtocol/barretenberg/releases/download/v0.21.0/barretenberg-x86_64-apple-darwin.tar.gz -o bb.tar.gz
tar -xzf bb.tar.gz
sudo mv barretenberg/bin/bb /usr/local/bin/Windows:
- Verify bb.exe is in your PATH
- Restart Command Prompt after PATH changes
- Check firewall isn't blocking execution
macOS & Windows:
# Reinstall Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Reload environment
source $HOME/.cargo/env # macOS
# or restart Command Prompt (Windows)Solutions:
- Check internet connection stability
- Try downloading again if connection interrupted
- Use a different network if available
- For macOS, try Homebrew mirror:
brew configto check mirrors
Solution:
# Use sudo for system-wide installations
sudo chown -R $(whoami) ~/.nargo
sudo chown -R $(whoami) ~/.cargoSolution:
- Free up at least 2GB of disk space
- Remove cache:
cargo clean - Remove build artifacts in project:
rm -rf target/
-
Update Homebrew:
brew update brew upgrade
-
Check Brew Doctor:
brew doctor
-
For M1/M2/M3 Macs: Some tools work better with Rosetta 2
# Install Rosetta 2 softwareupdate --install-rosetta
-
Use PowerShell as Administrator: Right-click → "Run as administrator"
-
Check Environment Variables:
- Press
Win + X→ "System" - Click "Advanced system settings"
- Check "Environment Variables"
- Press
-
Restart After Installing: Windows requires restart for PATH updates
-
Antivirus Settings: Some antivirus software may interfere with compilation
After successful installation:
- ✅ Verify all components are installed
- 📁 Create your first Noir project:
nargo new hello_noir - 📝 Write a simple circuit in
src/main.nr - 🔧 Compile the circuit:
nargo compile - ✅ Run tests:
nargo test - 🚀 Generate proofs:
nargo execute
If you encounter issues:
- Check Official Documentation: https://noir-lang.org/docs/
- Aztec Discord: Join the community
- GitHub Issues: Report bugs at https://github.com/noir-lang/noir/issues
- Stack Exchange: Ask questions with
#noirtag
This guide is regularly updated. Last updated: October 2025