These are instructions on how to build Ligo from source in Ubuntu. For ordinary user installs, see the doc website.
In order to build Ligo, you may need to install:
opam
- OCaml package manager,pkg-config
tool for finding library compilation flags,cargo
- rust package manager for Rust interoperability (needed for the Tezos Edo protocol)- libraries with include files:
libev
- event handling librarylibhidapi
libffi
- foreign function interface librarylibgmp
- arbitrary size integer library
-
Please first install necessary build tools and libraries with:
apt update apt install -y opam cargo make pkg-config libhidapi-dev libev-dev libgmp-dev libffi-dev
opam
andcargo
can be installed via their installation scripts instead of fromapt
, if desired. See the opam and rustup install instructions. -
Then you may want to initialize
opam
:opam init --bare --auto-setup
-
Now you are ready to start building Ligo itself. To build and run the tests:
make
To only build:
make build
For an example Ubuntu-based Docker image, see [Dockerfile.ubuntu
][./Dockerfile.ubuntu].