Build from Source
Building from source gives you the latest features and the ability to customize Nexus OS.
Clone the Repository
git clone https://github.com/leonidas-esquire/nexus-os
cd nexus-os
Build
# Debug build (faster compilation, slower runtime)
cargo build
# Release build (slower compilation, optimized runtime)
cargo build --release
Install
# Copy to your PATH
sudo cp target/release/naos /usr/local/bin/
# Or use cargo install
cargo install --path .
Build Options
| Flag | Effect |
|---|---|
--release |
Optimized build (~10MB binary) |
--features edge |
Include Cloudflare edge support |
--features full |
All features enabled |
# Full-featured release build
cargo build --release --features full
Cross-Compilation
Build for a different target:
# Add target
rustup target add x86_64-unknown-linux-musl
# Build static binary
cargo build --release --target x86_64-unknown-linux-musl
Troubleshooting Build Issues
Missing C compiler
# macOS
xcode-select --install
# Ubuntu/Debian
sudo apt install build-essential
# Fedora
sudo dnf install gcc
Rust version too old
rustup update stable