Installation
Start by installing the Bonsol CLI which provides you with all the necessary tools for starting a new project. The Bonsol CLI is compatible with both Linux and macOS operating systems.
Requirements
Anchor CLI (optional, if you want to write your Solana programs in Anchor)
Installation
Build with Bonsol by installing the following components:
RISC Zero zkVM – Write secure off-chain logic.
Bonsol CLI – Initialize, build, and deploy your off-chain programs.
You can install these tools using the provided install script or opt for manual installation.
Install Script
# Install Bonsol CLI and Risc0 toolchain
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/bonsol-collective/bonsol/refs/heads/main/bin/install.sh | sh
Make sure the script completed without errors. Otherwise use the manual install method below.
Manual Install
Install the RISC Zero version management library and CLI using rzup
. Bonsol currently supports version 1.2.1.
curl -L https://risczero.com/install | bash
rzup install cargo-risczero 1.2.1
Then install the Bonsol CLI depending on your architecture:
Verify Installation
Verify the installation by running:
bonsol --help
You will see the following:
Usage: bonsol [OPTIONS] <COMMAND>
Commands:
deploy Deploy a program with various storage options, such as S3, or manually with a URL
build Build a ZK program
estimate Estimate the execution cost of a ZK RISC0 program
execute
prove
init Initialize a new project
help Print this message or the help of the given subcommand(s)
Options:
-c, --config <CONFIG> The path to a Solana CLI config [Default: '~/.config/solana/cli/config.yml']
-k, --keypair <KEYPAIR> The path to a Solana keypair file [Default: '~/.config/solana/id.json']
-u, --rpc-url <RPC_URL> The Solana cluster the Solana CLI will make requests to
-h, --help Print help
-V, --version Print version
See here for documentation on these Bonsol CLI commands.
Uninstall
If you want to uninstall Bonsol, simply run:
cargo uninstall bonsol-cli
Verify the uninstall using:
bonsol --version
You will see the following:
zsh: command not found: bonsol
Notes
Docker Setup for WSL
For Bonsol development in WSL, we strongly recommend installing Docker directly in your WSL environment rather than using Docker Desktop for Windows.
FlatBuffers v24.3.25
FlatBuffers is a cross-platform serialization library. Build it from source on Linux or macOS.
Last updated