Skip to content

Running witnet-rust from source code

Install compilation dependencies

Rust 2018 (stable channel)

curl -sSf | sh
source $HOME/.cargo/env
rustup default stable

Compilation dependencies

apt install -y clang git libssl-dev protobuf-compiler
pacman -S clang git openssl protobuf
xcode-select --install
brew install git openssl protobuf

MkDocs Python packages

(Optional, only if generating documentation)

pip install mkdocs
pip install pymdown-extensions
pip install mkdocs-material

Checkout source code from GitHub

git clone
cd witnet-rust
git clone [email protected]:witnet/witnet-rust.git
cd witnet-rust

Run with cargo

By default, this line will run a Witnet node and connect to the Testnet using the default configuration:

cargo run node

For more witnet-rust commands (cli, wallet, etc.) you can read the Witnet-rust CLI documentation.

Building a release

This one-liner will build a releasable standalone binary compatible with the architecture of your computer's processor:

cargo build --release

The resulting binary will be located at ./target/release/witnet.

If you want to produce binaries for other architectures, please read the cross compilation instructions.