mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-08-14 00:47:51 +00:00
release-fast profile
Introduces a `release-fast` profile that inherits from `release` but uses thin LTO and 8 codegen units instead of full LTO + 1, cutting link time significantly while remaining fast enough for integration testing. Documents usage in CONTRIBUTING.md. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
fdd6c1a1f7
commit
7505007d8c
@@ -56,6 +56,16 @@ Tests that require a real LLM key will skip gracefully if the env var is absent.
|
|||||||
cargo build --workspace
|
cargo build --workspace
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Fast Release Build (for development)
|
||||||
|
|
||||||
|
The default `--release` profile uses full LTO and single-codegen-unit, which produces the smallest/fastest binary but is slow to compile. For iterating locally, use the `release-fast` profile instead:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo build --profile release-fast -p openfang-cli
|
||||||
|
```
|
||||||
|
|
||||||
|
This cuts link time significantly (thin LTO, 8 codegen units, `opt-level=2`) while still producing a binary fast enough to run integration tests against. Use `--release` only for final binaries or CI.
|
||||||
|
|
||||||
### Run All Tests
|
### Run All Tests
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -150,3 +150,10 @@ lto = true
|
|||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
strip = true
|
strip = true
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
|
[profile.release-fast]
|
||||||
|
inherits = "release"
|
||||||
|
lto = "thin"
|
||||||
|
codegen-units = 8
|
||||||
|
opt-level = 2
|
||||||
|
strip = false
|
||||||
|
|||||||
Reference in New Issue
Block a user