Skip to main content

Running Parity Substrate on Mac OS X

· 2 min read
Shawn Tabrizi
Software Engineer

This guide will show you the steps to successfully connect to the Substrate testnet, BBQ Birch using Mac OS X.

All of the instructions on this page are commands which should be copied into your Terminal application.

Prerequisites

First we need to install Rust. Open the terminal app on your Mac, and run the following:

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

Follow the instructions that appear to complete the installation.

At the end of this installation, you will need to run source $HOME/.cargo/env or log out and back into your computer to have your terminal understand rustup/cargo commands.

To enable Rust to compile to WebAssembly, run the following:

rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo install --git https://github.com/alexcrichton/wasm-gc

Install the Homebrew package manager for OS X:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Follow the instructions that appear to complete the installation.

Finally install some general packages required for running this software:

brew install cmake pkg-config openssl git

Click each package to learn more about it: cmake, pkg-config, openssl, git

Installing Substrate

Navigate to the folder of your choice, and clone the Substrate repository there:

git clone https://github.com/paritytech/substrate.git
cd substrate

Then build the WebAssembly binaries required for Substrate:

./scripts/build.sh

Finally build the Rust native code:

cargo build

Optional: If you want to make sure everything got installed correctly, you can run the full suite of Substrate tests:

cargo test --all

Running the Substrate Testnet: BBQ Birch

To start syncing your BBQ Birch node, simply type:

cargo run

Screenshot of BBQ Birch running in Terminal

What next?

More documentation to come on interacting with the network!