Kache
Install Kache v2, verify reuse, and find the guide for your workflow
Kache reuses matching compiler outputs for Rust, C/C++, and CUDA. Keep using your build tools; Kache restores eligible work from a shared local store and compiles the rest. Optional remote storage shares that work between machines.
Start with a local build
Install Kache v2.1.1:
cargo install kache --locked --version 2.1.1
kache init
kache doctor --probe
cargo build
An unversioned install selects the latest stable release. The
upgrade guide explains the paired
kache/kache-engine installation and migration from 1.x or a v2 preview.
You need Rust 1.95 or newer to install through Cargo. Prebuilt packages are
available in the installation guide.
kache init shows its setup plan before applying changes.
A fresh cache needs a build to fill it. If Cargo already has up-to-date outputs, it skips the compiler and Kache has nothing to restore. Follow the quick start to verify reuse in two worktrees with separate target directories.
Set up your workflow
| Task | Guide |
|---|---|
| Upgrade from 1.x or a v2 preview | Upgrading to v2 |
| Share artifacts and private incremental state between worktrees | Worktrees |
| Understand disk use or reclaim old build output | Storage and cleanup |
| Configure Windows Rust, PDB, clang-cl, or CUDA caching | Windows builds |
| Cache Make, CMake, or build-script C/C++ | C and C++ |
| Cache CUDA object compilations | CUDA |
| Cache Rust documentation | Rustdoc |
| Use Kache with cargo-mutants | Mutation testing |
| Share work between machines | Remote cache |
| Configure GitHub Actions or another CI | CI setup |
| Change storage limits or build policy | Configuration |
| Use local Blaze routing | Blaze |
Understand a build
Start with Troubleshooting if a build has unexpected misses or no hits. Use Monitor to inspect live activity and the full report to save a build's results.
For the details, read cache keys, build-script inputs, concurrent builds, and storage deduplication.
Current support
| Area | Support |
|---|---|
| Rust libraries | Linux, macOS, and Windows |
| Rust executables, test binaries and build scripts | Cached by default on Linux and macOS, off by default on Windows (cache_executables). Build-script runs are cached on Linux and macOS |
| C and C++ object compilation | GCC, Clang, Apple Clang, and clang-cl. MSVC cl.exe is not cached |
| CUDA object compilation | Single-source nvcc -c and -dc |
| Rust documentation | Unix with compatible Cargo versions and unstable rustdoc flags. Rust 1.99 and Windows pass through |
| Local cache | Content-addressed storage with automatic garbage collection |
| Remote cache | S3-compatible storage, GCS, filesystems, and OCI registries |
| Build visibility | Live monitor, stats, miss explanations, and reports |
| Incremental edits | Managed target-local state and compatible donor seeds with supported rustc 1.98+ |
| Optional Blaze routing | Main only; local default-profile commands on Linux and Apple silicon macOS |
Kache passes unsupported compiler invocations through unchanged. A passthrough is not a cache hit or miss. Its reason appears in the monitor's Why tab and in the Not cached section of kache stats --full.
Reference and measurements
- Command reference: commands, flags, and report formats.
- Compatibility: release channels, v2 interfaces, local state, and source-build requirements.
- Architecture: wrapper, store, daemon, and planner.
- Daemon lifecycle: services, restarts, and environment changes.
- Benchmarks: real-project workloads, measurements, and validation.
- Kache or sccache?: capabilities and tradeoffs.
Feedback
If Kache behaves differently from these docs, open a bug report. For a missing compiler, remote backend, or workflow, request a feature.