talira

Shared compilation cache for C, C++, Rust and CUDA, stored locally or in the cloud

open sourceApache-2.0self-hostablefree

sccache is a ccache-like compiler wrapper from Mozilla that avoids recompilation by caching results on local disk or in remote storage. It supports C/C++, Rust, assembler and CUDA (nvcc and clang). Storage backends include S3, R2, Redis, Memcached, GCS, Azure, GitHub Actions cache, WebDAV and others, with multi-level caching, and it also offers icecream-style distributed compilation.

Ways to install

Problems it solves

  • our CI recompiles the same C++ and Rust code on every single run
  • share compiled objects between developers and CI machines through a cloud bucket
  • set RUSTC_WRAPPER to something that skips compiling crates that haven't changed
  • clean builds of our big Rust workspace take 20 minutes
  • cache compiler output in Redis or S3 so ephemeral runners start warm
  • distribute C++ compilation across a few beefy machines
  • speed up GitHub Actions Rust builds using the Actions cache
  • cache CUDA compilation results
  • Docker builds in CI keep starting from zero compile time

Features

  • local disk cache
  • S3/R2/GCS/Azure/Redis/Memcached/WebDAV backends
  • GitHub Actions cache backend
  • multi-level cache
  • icecream-style distributed compilation
  • Rust, C/C++, CUDA support

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what sccache does.

  1. Kache Build once. Reuse the work.
  2. Mr Boxington (mbx) A shared cache for Cargo builds
  3. ccache Compiler cache that speeds up C and C++ rebuilds
  4. Swatinem/rust-cache A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.
  5. cargo-chef Cache the dependencies of your Rust project and speed up your Docker builds.
  6. BuildBuddy Open source Bazel build event viewer, result store, remote cache, and remote build execution platform.

Compare sccache with the top 3