Installation
Snarky is written in OCaml and built on the libsnark C++ library.
Libsnark
To install the dependencies for libsnark, simply run:
bash <(curl -sL https://raw.githubusercontent.com/o1-labs/snarky/master/scripts/depends.sh)
(to install these manually, see these instructions).
opam
The best way to install Snarky and OCaml is via opam — the OCaml package manager. To install opam, run
sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
or see the opam install page.
OCaml
Set up a new 'switch' in opam with the latest version of OCaml:
# environment setup
opam init
eval `opam env`
# install given version of the compiler
opam switch create 4.07.1
eval `opam env`
# check that you got what you want
which ocaml
ocaml --version
ReasonML
Install the Reason tooling with opam install reason rtop
.
Snarky
Now, simply install snarky from our GitHub repo:
opam pin add git@github.com:o1-labs/snarky.git