Installation
How do I put Circom on my computer?
If you just want to play with basic circuits, you may find zkrepl.dev to be a lightweight option. Otherwise, you will need to install rust to build and install the Circom binary on your machine. This is the only time you will have to use Rust.
Install the Circom Binary
Installing dependenciesYou need several dependencies in your system to run
circom
and its associated tools.
The core tool is the
circom
compiler which is written in Rust. To have Rust available in your system, you can installrustup
. If youβre using Linux or macOS, open a terminal and enter the following command:
We also distribute a series of npm packages so
Node.js
and some package manager likenpm
oryarn
should be available in your system. Recent versions ofNode.js
include big integer support and web assembly compilers that help run code faster, so to get a better performance, install version 10 or higher.
Installing circomTo install from our sources, clone the
circom
repository:Enter the circom directory and use the cargo build to compile:
The installation takes around 3 minutes to be completed. When the command successfully finishes, it generates the
circom
binary in the directorytarget/release
. You can install this binary as follows:The previous command will install the
circom
binary in the directory$HOME/.cargo/bin
.Now, you should be able to see all the options of the executable by using the
help
flag . ..
Installing SnarkJS for Development
The officially recommended installation for SnarkJS is use npm or yarn to install the package globally. This enables SnarkJS from the command line.
For the purpose of version control, we hold the opinion that it is better to install SnarkJS at the application level rather than globally. We will use this convention throughout awesome-circom.
See the SnarkJS section for more information on the usage of SnarkJS, including production installation.
Last updated