Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

sccache: Orientation

Compiler cacheTokio client/serverRevision f36b89a

sccache is a local client/server compiler wrapper that turns a compiler invocation into a content-addressed lookup, falling back to local or distributed execution and asynchronously publishing successful artifacts.

build tool → short-lived client → resident server → compiler analysis + hash
                                               ↓
                                    cache hit or compilation
                                               ↓
                                  outputs now + cache write future

Design thesis

sccache separates the latency-sensitive compiler response from reusable cache publication, while a resident server shares compiler knowledge, storage, and a machine-wide execution budget across otherwise independent build clients.

  • Compiler-specific parsing produces a common cacheable computation.
  • Content identity, not invocation order, names reusable work.
  • Trait objects select compilers and storage backends at runtime.
  • Tokio overlaps IPC and remote I/O; blocking filesystem work and child processes cross explicit boundaries.
  • A jobserver token limits compiler processes independently of connection count.