---
title: "Build from Source"
description: "Building from source gives you the latest features and the ability to customize Nexus OS. Flag Effect release Optimized build ( 10MB binary) features edge Include Cloudflare edge support features full All features enable"
resource: https://www.aiagents.nexus/docs/manual/installation/build-from-source
generated: { by: "process:nexus-agent-assets", at: 2026-09-07T09:13:03Z }
status: stable
---

# Build from Source

Building from source gives you the latest features and the ability to customize Nexus OS.

## Clone the Repository

```bash
git clone https://github.com/leonidas-esquire/nexus-os
cd nexus-os
```

## Build

```bash
# Debug build (faster compilation, slower runtime)
cargo build

# Release build (slower compilation, optimized runtime)
cargo build --release
```

## Install

```bash
# 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 |

```bash
# Full-featured release build
cargo build --release --features full
```

## Cross-Compilation

Build for a different target:

```bash
# 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
```bash
# macOS
xcode-select --install

# Ubuntu/Debian
sudo apt install build-essential

# Fedora
sudo dnf install gcc
```

### Rust version too old
```bash
rustup update stable
```
