Problem
./install.sh already skips installation-time rebuilds in some cases, but it still leaves obvious build-speed wins on the table.
Current behavior in install.sh:
- it uses a coarse stale check based on
git describe and file mtimes under codex-rs/
- it forces
CARGO_INCREMENTAL=0, which prevents reuse of incremental artifacts during local rebuilds
- it only decides whether to rebuild the final binary, not whether unchanged intermediate artifacts can be reused more aggressively
The result is slower local install/build loops than necessary, especially when only a small subset of files changed.
Goal
Make ./install.sh faster for iterative local use by avoiding unnecessary rebuild work and reusing build outputs when inputs have not changed.
Acceptance Criteria
- Audit the current rebuild decision logic in
install.sh and identify avoidable full rebuild paths.
- Propose or implement a caching/reuse strategy for unchanged inputs and build artifacts.
- Preserve correctness: modified sources must still trigger rebuilds, and stale binaries must not be installed.
- Document any new env knobs or behavior changes in
./install.sh --help.
- Add validation that demonstrates the optimized path skips redundant rebuild work when inputs are unchanged.
Notes
Likely areas to investigate:
- whether
CARGO_INCREMENTAL=0 is still the right default for local install flows
- whether the stale check should use a more precise fingerprint than broad file mtime scanning
- whether build metadata can be cached to distinguish source changes from no-op installs
- whether release/profile tradeoffs should differ for first build vs repeat local installs
Problem
./install.shalready skips installation-time rebuilds in some cases, but it still leaves obvious build-speed wins on the table.Current behavior in
install.sh:git describeand file mtimes undercodex-rs/CARGO_INCREMENTAL=0, which prevents reuse of incremental artifacts during local rebuildsThe result is slower local install/build loops than necessary, especially when only a small subset of files changed.
Goal
Make
./install.shfaster for iterative local use by avoiding unnecessary rebuild work and reusing build outputs when inputs have not changed.Acceptance Criteria
install.shand identify avoidable full rebuild paths../install.sh --help.Notes
Likely areas to investigate:
CARGO_INCREMENTAL=0is still the right default for local install flows