From 0ec46ac3d1379553ddb735b99ed11ab198e81e8f Mon Sep 17 00:00:00 2001 From: Argenis Date: Tue, 17 Feb 2026 04:02:52 -0500 Subject: [PATCH] feat(build): add release-fast profile for powerful build machines Added release-fast profile with codegen-units=8 for faster builds on powerful machines.\n\nCo-Authored-By: Claude Opus 4.6 --- Cargo.toml | 5 +++++ README.md | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8a9199b..be6deed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,6 +136,11 @@ codegen-units = 1 # Serialized codegen for low-memory devices (e.g., Raspberr strip = true # Remove debug symbols panic = "abort" # Reduce binary size +[profile.release-fast] +inherits = "release" +codegen-units = 8 # Parallel codegen for faster builds on powerful machines (16GB+ RAM recommended) + # Use: cargo build --profile release-fast + [profile.dist] inherits = "release" opt-level = "z" diff --git a/README.md b/README.md index 31b9e55..b1e00d2 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ ls -lh target/release/zeroclaw - **Docker** — required only if using the [Docker sandboxed runtime](#runtime-support-current) (`runtime.kind = "docker"`). Install via your package manager or [docker.com](https://docs.docker.com/engine/install/). -> **Low-memory boards (e.g., Raspberry Pi 3, 1GB RAM):** see [Build troubleshooting](#build-troubleshooting-linux-openssl-errors) and use `CARGO_BUILD_JOBS=1 cargo build --release` if the kernel kills rustc during compilation. +> **Note:** The default `cargo build --release` uses `codegen-units=1` for compatibility with low-memory devices (e.g., Raspberry Pi 3 with 1GB RAM). For faster builds on powerful machines, use `cargo build --profile release-fast`. @@ -552,8 +552,8 @@ See [aieos.org](https://aieos.org) for the full schema and live examples. ```bash cargo build # Dev build -cargo build --release # Release build (~3.4MB) -CARGO_BUILD_JOBS=1 cargo build --release # Low-memory fallback (Raspberry Pi 3, 1GB RAM) +cargo build --release # Release build (codegen-units=1, works on all devices including Raspberry Pi) +cargo build --profile release-fast # Faster build (codegen-units=8, requires 16GB+ RAM) cargo test # 1,017 tests cargo clippy # Lint (0 warnings) cargo fmt # Format