If you do not have substrate installed on your machine, run:

curl -sSf | bash

While the code compiles, read about how the Substrate runtime architecture composes modules to configure a runtime.


At the moment, this resource focuses primarily on module development patterns, though there are plans to add examples of interesting runtime configurations using the existing modules. To develop in the context of the module, it is sufficient to clone the module-template

$ git clone

build with

$ cargo build

test with

$ cargo test

See Creating a Runtime Module in the official docs.


To develop in the context of the runtime, clone the substrate-node-template and add module logic to runtime/src/

Updating the Runtime

Compile runtime binaries

cd runtime
cargo build --release

Delete the old chain before you start the new one (this is a very useful command sequence when building and testing runtimes)

./target/release/substrate-example purge-chain --dev
./target/release/substrate-example --dev