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