Builds use the toolchain file at the repository root. Host packages below are the same ones CI installs in .github/actions.
rust-toolchain pins:
| Field | Value |
|---|---|
| Channel | 1.93.0 (stable) |
| Components | clippy |
| Targets | wasm32v1-none |
| Profile | minimal |
With rustup installed, cargo and rustc read that file when the working directory is inside this repo and install the pin if it is missing. Build and cargo doc pick up the pin on their own. scripts/fmt.sh is the entry point for formatting.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
cd /path/to/chain
rustup showrustup show should report 1.93.0 as the active toolchain, with wasm32v1-none installed.
Runtime builds use wasm32v1-none, the target named in rust-toolchain. CI also installs wasm32-unknown-unknown and the rust-src component before clippy and cargo doc.
.rustfmt.toml uses options that only nightly rustfmt accepts. That nightly is pinned separately in rustfmt-toolchain so format output stays stable. scripts/fmt.sh installs it (--profile minimal --component rustfmt) and forwards arguments to cargo fmt.
scripts/fmt.sh --all -- --checkTo bump the formatter, change the date in rustfmt-toolchain, run scripts/fmt.sh --all, and commit the reformat together with the pin.
TOML is formatted with taplo:
taplo format --config taplo.tomlbindgen (RocksDB and related crates) needs libclang. litep2p compiles protobuf schemas at build time.
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang libclang-dev protobuf-compilerbrew install protobuf llvm cmake openssl
export LIBCLANG_PATH="$(brew --prefix llvm)/lib"Put LIBCLANG_PATH in the shell profile you use for builds. Apple Silicon and Intel Homebrew prefixes differ; brew --prefix llvm covers both.
Native Windows builds are what the Windows CI job does. From a shell that can see choco and rustup:
choco install protoc --yes
choco install llvm --yesSet LIBCLANG_PATH to C:\Program Files\LLVM\bin.
env-setup/flake.nix is a dev shell with rustup, clang, protobuf, and LIBCLANG_PATH already set. From env-setup/:
nix developThen build from the repository root so rustup still honors rust-toolchain.
cargo build --releaseThe node binary is target/release/quantus-node. See the README for running it.