On this page

latest contributor to this doc

Last Edit:

@gcharang

How To Compile Komodo DeFi Framework API from Source

The following tutorial introduces the reader to a simple method to build the Komodo DeFi Framework API from source.

sudo apt update
sudo apt-get install build-essential git jq llvm-3.9-dev libclang-3.9-dev clang-3.9 cmake libssl-dev pkg-config

If you are using Ubuntu 20.04, run:

sudo apt update
sudo apt-get install build-essential git jq llvm-dev libclang-dev clang cmake libssl-dev pkg-config

For rpm-based distributions:

sudo dnf groupinstall "Development Tools"
sudo dnf install jq clang cmake openssl-devel clang-devel libzstd systemd-devel  # systemd-devel is used for libudev dep instead of pkg-config

curl https://sh.rustup.rs -sSf | sh

When asked to select an installation type, select the following option: 2) Customize installation

Choose default host triple and toolchain, then select minimal profile.

Once the installation is complete, enter Logout and then Login again.

Alternatively, you may execute the following command in each active shell until you reach the Login again.

source $HOME/.cargo/env

rustup install nightly-2022-02-01
rustup default nightly-2022-02-01
rustup component add rustfmt-preview

cd ~ ; git clone https://github.com/KomodoPlatform/komodo-defi-framework --branch mm2.1 --single-branch && cd komodo-defi-framework

cargo build --features native -vv