Getting Started¶
This page covers how to set up a development environment for building with Soil.
Prerequisites¶
You need the following installed on your system:
- Rust (stable toolchain, latest version recommended)
- C compiler and linker (
gcc,clang, or equivalent) - System libraries required by RocksDB and networking:
libssl-dev,pkg-config,libclang-dev,protobuf-compiler
Ubuntu / Debian¶
sudo apt update
sudo apt install -y build-essential git clang curl libssl-dev \
pkg-config libclang-dev protobuf-compiler
Install Rust¶
Soil targets the stable Rust toolchain. The Wasm runtime compilation uses the wasm32-unknown-unknown target, which is added automatically by the build scripts when needed.
Clone and Build¶
Build times
A full release build of the entire workspace can take a while on the first run, since the workspace includes many crates and their dependencies. Subsequent builds are incremental and much faster.
For a quicker compilation-only check (no linking or test binaries):
Run the Test Suite¶
Warning
The full test suite takes 30+ minutes. During development, run tests for individual crates instead:
Project Structure at a Glance¶
After cloning, the workspace lives under soil/:
soil/
├── main/ # Core framework crates (subsoil, topsoil, soil-*)
├── runtime/ # Pallets (plant-*)
├── contrib/ # Optional / contributed pallets
├── harness/ # Test utilities and mock runtimes
├── library/ # Standalone tools (subkey, wasm-builder)
├── Cargo.toml # Workspace root
└── README.md
See Architecture for a detailed explanation of each directory.
Next Steps¶
Once your environment is set up, continue to Building a Minimal Node for a guided walkthrough of assembling a working blockchain node from Soil crates.