# Swatinem/rust-cache

A GitHub Action that implements smart caching for rust/cargo projects

Repository: https://github.com/Swatinem/rust-cache
Canonical: https://ross.abutalabs.com/products/rust-cache
Language: TypeScript
License: LGPL-3.0
License Family: copyleft
Last push: 2026-08-24T21:45:34+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 84, longevity 100
- inputs: {"age_days": 2168, "days_push": 9, "days_rel": 27, "gap_med": 79, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1891, forks 188 (observed 2026-08-28T04:05:49.634383+00:00)

## What it is
A GitHub Action that provides smart caching for Rust/Cargo projects in CI workflows, caching the cargo registry, dependency builds, and workspace target directories with sensible defaults. It computes cache keys from the toolchain version, Cargo.lock, and configuration files to speed up Rust builds on GitHub Actions.

## Use cases
- speed up rust builds in github actions
- cache cargo dependencies in ci
- avoid recompiling crates on every ci run
- cache cargo target directory across workflow runs
- reduce rust ci build times
- share cargo build cache between jobs

## When to choose
- you build Rust or Cargo projects on GitHub Actions
- you want zero-config caching with sensible defaults
- you need cache keys that track toolchain and Cargo.lock changes

## When to avoid
- you build Rust outside GitHub Actions
- you use GitLab CI or another CI system
- you need fine-grained per-crate incremental caching

## Facets
- artifact type: plugin
- maturity: active
- function: caching, ci-cd, build-tool, developer-tools
- domain: developer-tools
- platform: cli, cloud
- tags: github-actions, cargo, rust, ci-caching, build-cache, devops, automation

## Member repositories
- Swatinem/rust-cache (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:49.634383+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:12:59.168448+00:00, confidence not recorded.
  - readme: https://github.com/Swatinem/rust-cache (fetched 2026-08-28T04:05:49.634383+00:00, sha 34618f0a59da)
- Data as of 2026-08-30T08:39:29.467469+00:00.
