Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

ci: build the CI test wheel with a fast cargo profile

Tejas Chopraa08a0befa72e
diff --git a/.github/workflows/ci-fast.yml b/.github/workflows/ci-fast.yml
index 28c9307d5..a5751fdf8 100644
--- a/.github/workflows/ci-fast.yml
+++ b/.github/workflows/ci-fast.yml
@@ -62,10 +62,12 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
workspaces: ". -> target"
- - name: Build wheel once (maturin)
+ - name: Build wheel once (maturin, fast CI profile)
run: |
python -m pip install --upgrade pip maturin
- maturin build --release --out dist --interpreter "python${PY_VERSION}"
+ # `--profile ci`: no LTO + parallel codegen-units → much faster compile
+ # than `--release` (lto + codegen-units=1). Tests don't need the optimized ext.
+ maturin build --profile ci --out dist --interpreter "python${PY_VERSION}"
- uses: actions/upload-artifact@v4
with:
name: headroom-wheel
diff --git a/Cargo.toml b/Cargo.toml
index c2c14f83a..4adfcbaa7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -106,3 +106,16 @@ gcp_auth = "0.12"
strip = "symbols"
lto = "thin"
codegen-units = 1
+
+# Fast-to-compile profile for CI test wheels. The shipped wheel uses
+# `release` (lto + codegen-units=1) for runtime/size; CI only needs a working
+# extension, so trade runtime perf for ~parallel, lto-free compilation. Used
+# via `maturin build --profile ci`. Does NOT affect `--release` builds.
+[profile.ci]
+inherits = "release"
+lto = false
+codegen-units = 256
+opt-level = 1
+strip = "none"
+debug = false
+incremental = false