| title | Installation |
|---|
Midnight-node is built with the Rust programming language on top of Polkadot SDK.
For detailed installation instructions for Rust and Polkadot SDK dependencies, please refer to the official Polkadot SDK documentation:
Install Polkadot SDK Dependencies
This guide covers all the necessary build dependencies for different operating systems (Ubuntu, macOS, Windows via WSL, etc.).
This repository includes a rust-toolchain.toml file that specifies the exact Rust version to use. The toolchain will be automatically installed when you run any cargo command.
To verify your Rust installation:
rustup showThe repository includes an .envrc file for environment configuration. You can use direnv to automatically load environment variables:
# Install direnv
# macOS:
brew install direnv
# Ubuntu/Debian:
sudo apt install direnv
# Add to your shell (~/.bashrc or ~/.zshrc)
eval "$(direnv hook bash)" # or zsh, fish, etc.
# Allow direnv in the repository
cd /path/to/midnight-node
direnv allowManual alternative: If you don't want to use direnv, source .envrc manually before running commands:
source .envrc
cargo check
cargo testAfter completing the setup, verify everything works:
# Check cargo commands work
cargo check
# Check earthly is available
earthly --version