Normally we would teach you more about the Substrate blockchain development framework, however, setting up your computer for Substrate development can take a while.
To optimize your time, we will have you start the setup process. In the next section, while things are compiling, you will learn more about Substrate and what we are building.
To develop on Substrate, your computer needs some prerequisites to establish a working development environment.
Setting up your computer is probably the hardest part of this tutorial, so don't let this discourage you.
If you are using a Unix-based machine (Linux, MacOS), we have created a simple one-liner to get all of those prerequisites installed for you:
curl https://getsubstrate.io -sSf | bash -s -- --fast
If you did not have Rust installed prior to running this script, make sure to add restart your terminal before continuing (command given in last line of the script output).
Learn what this script does.
If you want to see specifically what this script does just visit: https://getsubstrate.io
It will automatically install:
Once the prerequisites are installed, you need to set up the skeleton for our project. The Substrate Node Template serves as a good starting point for building on Substrate.
Clone the Substrate Node Template (version
git clone -b v2.0.0-alpha.3 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
Initialize your WebAssembly build environment
# Load settings into the current shell script if you can't use rustup command source ~/.cargo/env # Update Rust rustup update nightly rustup update stable # Add Wasm target rustup target add wasm32-unknown-unknown --toolchain nightly
Create a branch for your work and Compile your Substrate node
cd substrate-node-template/ git checkout -b my-first-substrate-chain cargo build --release
This final compilation can take up to 25 minutes depending on your hardware. In that time, read the next section to learn more about Substrate.