Purpose and Scope
This document provides detailed instructions for building StableNet from source. It covers the build system architecture, available build targets, and cross-compilation options. For information on configuring a built node, see Node Configuration.For initializing a new network with a genesis file, see Genesis Setup and Network Initialization.
Prerequisites
Building StableNet from source requires Go 1.22 or later. Additional dependencies required for building:- C compiler (gcc or clang) — required for CGO-enabled packages
- Git — required for embedding version metadata
- Make (optional, for convenience targets)
Build System Architecture
The StableNet build system is centered around Go-based build scripts that generate node executables, handle build environment detection, and apply shared build logic.Build System Components
Building from Source
Using Make
StableNet can be built easily using Makefile targets.build/bin/ directory.
Using build/ci.go Directly
For finer-grained control, you can invoke the build script directly:install command:
Available Build Targets
All executables are built intobuild/bin/:
Cross-Compilation
The build system supports cross-compilation for multiple architectures and operating systems using Go’s built-in cross-compilation features and external C toolchains.Supported Platforms
The CI system builds for the following platforms:Build Verification
After building, run tests to verify correct operation:build/ci.go test command supports the following options:

