Kache 2.0 reuses private Rust incremental state between compatible local worktrees and ships a small client with a matching companion engine. This stable release includes the three published release candidates and the fixes merged afterward.
Finish active builds before upgrading. Install the matching client and engine, refresh setup, then verify a real miss followed by a local hit:
cargo install kache --locked --version 2.0.0
kache init
kache daemon restart
kache doctor --probeAdded
-
Worktrees: compatible local worktrees can seed private incremental state automatically with supported rustc 1.98 or later. Imports use copy-on-write clones or independent copies, so a donor's writable files are never shared.
KACHE_SEED_INCREMENTAL=0disables seeding. #1647, #1704, #1766 by @jleni, @mvanhorn and @TastyCZ. -
Concurrent builds: foreground requests get a queue head start while older background requests gain priority. Bounded capacity waits have recovery admission. Under sustained memory pressure, a shared ceiling reduces ordinary compiler concurrency and recovers gradually when pressure clears. #1775, #1778, #1782 by @jleni and @ainhoa-a.
-
Configuration:
config get,set,unset,listandpathsupport scripts and JSON output. Byte-size settings accept units in TOML, environment variables and CLI edits:GBis decimal andGiBis binary. #1732, #1789 by @jleni.kache config set cache.local_max_size 50GiB kache config set cache.restore_max_size 12GiB kache daemon restart
-
Index policy:
cache.index_modeacceptsauto,conservativeandoff. The defaultautocurrently selectsconservative, using SQLite WAL withsynchronous=NORMAL.offexplicitly disables index synchronization for disposable caches; a crash can corrupt that index. CI detection never enables it automatically. #1791 by @jleni and @glebpom. -
Checks and cleanup: the Cargo shim and
kache cargogive check and Clippy their owntarget/checkdirectory by default. Explicit output directories take precedence;cache.separate_check_targets = falseopts out.kache clean --cache --rustc-versionselects entries by compiler version and supports a dry run. #1776 by @jleni. -
Terminal tools:
kache initinstalls Bash, Zsh and Fish completions on Unix. The monitor shows selected-build details in narrow terminals.kache doctor --probetests actual local reuse, andexplain --allincludes retained skips and passthroughs. Reports identify producer versions and group recognized older bugs separately. #1723, #1724, #1707, #1722, #1760 by @jleni. -
Optional Blaze: opt into
cache.blazefor eligible local default-profile Cargo commands on Linux or Apple silicon macOS. Routing is off by default and detects an installed Blaze client at build time. CI, release builds and explicit profiles stay on Cargo. Blaze has its own compiler/cache; eligible dependency work can still use Kache. #1750 by @jleni. -
Windows link inputs: with executable caching enabled, validated absolute
.resfiles and a closed application-manifest subset can join the native link key. Manifest keys include the selectedmt.exeand guard its lookup. Objects, archives and unmodeled manifest forms remain passthrough cases. #1684, #1799 by @jleni and @TastyCZ.
Fixed
- Windows startup: file-hash IPC reaches the daemon through the named pipe directly. Cold MSVC runtime hashes prepare in the background by default, allowing initial units to compile without caching while preparation finishes. Set
cache.native_runtime_warmup = falseto wait and cache from the first compile. NTFS identity checks protect reuse after file replacement or same-size edits. #1797 by @jleni. - Windows outputs: long engine handoffs avoid error 206, executable restores retain matching PDB/import-library sidecars, and worktree seeds handle Windows donor paths and Cargo lint flags.
cl.exe, including cross-host tool paths, passes through uncached. #1762, #1685, #1747, #1766, #1640 by @jleni and @TastyCZ. - macOS: valid multi-GiB debug bundles no longer hit the old 2 GiB extraction cap. The default restore limit is 8 GiB and can be configured. The test runner carries dynamic-library paths through the hardened runtime, fixing Bevy dynamic-linking launches. Apple deployment-target variables now change Rust library and metadata keys. #1787, #1789, #1781, #1793 by @jleni and @ainhoa-a.
- Build-script correctness: declared input timestamps now participate in run keys, so touching an input cannot restore generated values from its old timestamp. A fresh checkout may rerun a script even when bytes match; unchanged outputs still allow Rust compilation hits. Restored native files receive current write times so incremental C/C++ builds notice header changes. #1779 by @jleni.
- Cache upgrades and cleanup: incompatible prediction metadata is rebuilt while compiled entries stay in the store. Rust metadata remains writable for
cargo fixandcargo clippy --fix. Target cleanup also checks running programs before removing their outputs. #1743, #1704, #1794 by @jleni and @mvanhorn. - Native builds: GCC
-g3caching, source directories shared only at the filesystem root, packed macOS debug bundles and normalizedOUT_DIRincludes reuse the right inputs and outputs. #1757, #1759, #1758, #1753 by @jleni and @CheckPickerUpper. - Remote reuse: demand timeouts no longer mark a healthy backend as failed.
cache.demand_timeout_secsmakes the default three-second synchronous restore budget configurable. Adaptive prefetch counts all manifest entries, and build-script results can restore from a read-only store. #1768, #1798, #1770, #1749 by @jleni. - Reports: JSON rows retain wrapper phase timings, including permit and flight waits, matching trace output. Missing historical miss details remain explicit; an upgrade cannot reconstruct data that was never recorded. #1796, #1760 by @ainhoa-a and @jleni.
Security
- Restore diagnostics: archive-controlled names have control characters replaced and long text truncated before reaching events, reports or restore warnings. The underlying error chain remains available. #1800 by @jleni and @ainhoa-a.
Breaking Changes
- Install matching
kacheandkache-enginebinaries together. Custom archives, container images and installers must copy both. Windows manual installs use the paired ZIP. #1639. - Restart the daemon after upgrading for the new execution protocol. Existing compiler wrapper settings continue to name
kache. #1702. - Managed incremental state from older layouts starts cold once. Compatible compiled cache entries remain reusable; a blanket cache deletion is unnecessary. #1704.
Docs
The upgrade guide, worktree guide and compatibility reference cover installation, supported workflows and migration. The documentation was reviewed against releases and merged changes. #1754 by @jleni.
New Contributors
Contributors
Credits include authors and coauthors of adopted contributions.
Full changelog: v1.2.2...v2.0.0