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 <noreply@anthropic.com>
This commit is contained in:
Argenis 2026-02-17 04:02:52 -05:00 committed by GitHub
parent 3d8ece4c59
commit 0ec46ac3d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View file

@ -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"

View file

@ -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`.
</details>
@ -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