Kache stores compiler outputs by content and reuses them across builds, repositories, and worktrees. The local cache works on its own. S3-compatible and filesystem remotes are optional.
Decide first
- Use Kache if you want shared caching across worktrees, local-first operation, built-in inspection tools, or explicit cache synchronization.
- Read Kache or sccache? if you are comparing compiler caches.
- Start with a temporary wrapper if you want to evaluate Kache without changing Cargo configuration or installing a service.
Five-minute Rust trial
Install Kache:
cargo install kache
From a Rust project, run:
RUSTC_WRAPPER=kache cargo build
cargo clean
KACHE_PROGRESS=hits RUSTC_WRAPPER=kache cargo build
kache stats
The second build should report cache hits. cargo clean forces Cargo to ask the compiler for the same outputs again; it is only needed for this demonstration.
Nothing above edits your Cargo configuration. When you are ready to keep Kache enabled, run:
kache init
Use kache init --check to preview the changes, or kache init --no-service to skip OS service installation.
Current support
| Area | Support |
|---|---|
| Rust libraries and build scripts | Linux, macOS, and Windows |
| Rust executables | Enabled by default on Linux and macOS; disabled by default on Windows |
| C and C++ object compilation | GCC, Clang, Apple Clang, and MSVC-compatible invocations that Kache can model safely |
| Local cache | Content-addressed storage with automatic garbage collection |
| Remote cache | S3-compatible and filesystem backends |
| Build visibility | Live monitor, stats, miss explanations, and reports |
Kache passes unsupported compiler invocations through unchanged. A passthrough is not a cache hit or miss; inspect its reason in the monitor's Passthrough tab or debug logs.
Tested nightly on real projects
The nightly benchmark workflow runs cold/warm builds of Firefox, LLVM, Substrate, SurrealDB, Lance, and OpenDAL, including Firefox runs on Linux and Windows and a side-by-side sccache run. Reports, traces, and logs are retained for 30 days.
Benchmark numbers count only when the individual job succeeds and its self-checking verdict is ok.
Go further
Install
Packages, binaries, source builds, and platform notes.
Quick start
Enable Kache for a project or across Cargo builds.
C and C++
Set up compiler shims and check what is cached.
Remote cache
Share entries through S3-compatible or filesystem storage.
Command reference
Exact commands and common flags.
How it works
Cache keys, storage, daemon behavior, and correctness boundaries.
Benchmarks
Nightly real-project runs, local scenarios, reports, and traces.
Feedback
If Kache behaves differently from these docs, open a bug report. For a missing compiler, remote backend, or workflow, open a feature request.