fix(build): unblock low-resource installs and release binaries (#1041)
* fix(build): unblock low-resource installs and release binaries * fix(ci): use supported intel macOS runner label
This commit is contained in:
parent
5c1d6fcba6
commit
f10bb998e0
5 changed files with 396 additions and 23 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
This guide focuses on common setup/runtime failures and fast resolution paths.
|
||||
|
||||
Last verified: **February 19, 2026**.
|
||||
Last verified: **February 20, 2026**.
|
||||
|
||||
## Installation / Bootstrap
|
||||
|
||||
|
|
@ -32,6 +32,48 @@ Fix:
|
|||
./bootstrap.sh --install-system-deps
|
||||
```
|
||||
|
||||
### Build fails on low-RAM / low-disk hosts
|
||||
|
||||
Symptoms:
|
||||
|
||||
- `cargo build --release` is killed (`signal: 9`, OOM killer, or `cannot allocate memory`)
|
||||
- Build crashes after adding swap because disk space runs out
|
||||
|
||||
Why this happens:
|
||||
|
||||
- Runtime memory (<5MB for common operations) is not the same as compile-time memory.
|
||||
- Full source build can require **2 GB RAM + swap** and **6+ GB free disk**.
|
||||
- Enabling swap on a tiny disk can avoid RAM OOM but still fail due to disk exhaustion.
|
||||
|
||||
Preferred path for constrained machines:
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prefer-prebuilt
|
||||
```
|
||||
|
||||
Binary-only mode (no source fallback):
|
||||
|
||||
```bash
|
||||
./bootstrap.sh --prebuilt-only
|
||||
```
|
||||
|
||||
If you must compile from source on constrained hosts:
|
||||
|
||||
1. Add swap only if you also have enough free disk for both swap + build output.
|
||||
1. Limit cargo parallelism:
|
||||
|
||||
```bash
|
||||
CARGO_BUILD_JOBS=1 cargo build --release --locked
|
||||
```
|
||||
|
||||
1. Reduce heavy features when Matrix is not required:
|
||||
|
||||
```bash
|
||||
cargo build --release --locked --no-default-features --features hardware
|
||||
```
|
||||
|
||||
1. Cross-compile on a stronger machine and copy the binary to the target host.
|
||||
|
||||
### Build is very slow or appears stuck
|
||||
|
||||
Symptoms:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue