Skip to main content

Installation

This page covers how to install the ZeroStyl CLI tools and set up your development environment.

Prerequisites

Before installing ZeroStyl, ensure you have the following:

Rust 1.85 or Later

ZeroStyl requires Rust 1.85+ for stable features used in the halo2 backend.

# Check your current Rust version
rustc --version

# Install or update via rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update stable

Cargo

Cargo is included with every Rust installation. Verify it is available:

cargo --version
Platform support

ZeroStyl is tested on Linux (x86_64) and macOS (Apple Silicon and x86_64). Windows support via WSL2 is experimental. Native Windows builds are not currently supported.


Build from source

The CLI binaries are not published to crates.io — they are built from the workspace. Clone the repository and compile in release mode:

git clone https://github.com/kazai777/zerostyl.git
cd zerostyl
cargo build --release
Library crates on crates.io

The reusable library crates are published — zerostyl-circuits, zerostyl-runtime, zerostyl-orbit, and the Rust zerostyl-sdk — so you can depend on them from your own project with cargo add zerostyl-sdk without cloning. The four command-line tools below are only available by building from source.

The first build compiles halo2 and its dependencies from source (a few minutes); subsequent builds are incremental. The compiled binaries are placed in ./target/release/:

BinaryCratePurpose
zerostyl-debugzerostyl-debuggerInspect circuits and debug witnesses
zerostyl-provezerostyl-cliGenerate and verify proofs
zerostyl-exportzerostyl-exporterGenerate circuits, ABIs, and SDKs from annotations
zerostyl-orbitzerostyl-orbitPer-chain deployability analysis

zerostyl-verifier is a library crate (no binary) — add it to a Stylus contract's Cargo.toml; see Verifier Integration.

To run the binaries directly from the workspace, use cargo run:

cargo run --bin zerostyl-debug -- --help

Or make them available on your PATH by copying them from target/release/, or with cargo install --path:

cargo install --path crates/zerostyl-cli # installs zerostyl-prove
cargo install --path crates/zerostyl-debugger # installs zerostyl-debug
cargo install --path crates/zerostyl-exporter # installs zerostyl-export
cargo install --path crates/zerostyl-orbit # installs zerostyl-orbit

Running tests

# Run all unit and integration tests
cargo test

# Run tests for a specific crate
cargo test -p zerostyl-cli
cargo test -p zerostyl-verifier

Verify the Installation

List the circuits bundled with the toolkit to confirm the build works:

cargo run --bin zerostyl-prove -- info list

You should see the built-in circuits (example, state_mask, tx_privacy, private_vote) with their versions. If that command runs, your installation is working correctly.


Optional: Arbitrum Stylus Toolchain

To deploy a Stylus contract that uses zerostyl-verifier, you need the Stylus toolchain on top of the standard Rust setup.

Install the Stylus CLI

cargo install --force cargo-stylus

Add the wasm32-unknown-unknown target

rustup target add wasm32-unknown-unknown

Install the Stylus WASM optimizer

cargo install wasm-opt

Verify the Stylus setup

cargo stylus --version
Stylus RPC endpoint

To deploy or test against a live network you will also need an Arbitrum Sepolia or Arbitrum One RPC endpoint. Alchemy and Infura both provide free Arbitrum endpoints.


Next Steps

With the tools installed, follow the Quick Start guide to debug your first circuit and generate a proof in under five minutes.