Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 883 Bytes

rust-setup.md

File metadata and controls

43 lines (35 loc) · 883 Bytes
  • Install Rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
  • Install essential dependencies for building a substrate node:

Ubuntu:

sudo apt update
sudo apt install -y cmake pkg-config libssl-dev git gcc build-essential git clang libclang-dev

Arch Linux:

pacman -Syu --needed --noconfirm cmake gcc openssl-1.0 pkgconf git clang
export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0";
export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0"

Mac OS:

brew update
brew install openssl cmake llvm

You may also be required to install a protobuf compiler:

# Ubuntu
sudo apt install -y protobuf-compiler

# Arch
pacman -Syu --needed --noconfirm protobuf

# Mac Os
brew install protobuf
  • Install the wasm target for your rust toolchain

rustup target add wasm32-unknown-unknown