What's the best practice for caching compilation of Rust dependencies?

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • Mergify - Updating dependencies is time-consuming.
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SonarQube - Static code analysis for 29 languages.
  • crane

    A Nix library for building cargo projects. Never build twice thanks to incremental artifact caching.

    https://github.com/ipetkov/crane seems very promising

  • sccache

    sccache is ccache with cloud storage

    I thought sccache also supports remote compilation. But maybe I misunderstood https://github.com/mozilla/sccache/blob/main/docs/DistributedQuickstart.md

  • Mergify

    Updating dependencies is time-consuming.. Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.

  • cargo-quick

    (currently vapourware) A cargo subcommand to quickly bootstrap your dependency tree on first build

    Hi. Sorry I'm late to the party. The approach that you suggest is similar to something that I was considering as well. https://github.com/cargo-quick/cargo-quickbuild contains a description of what I think you would need. Basically, it would look a bit like cargo-chef, but with a way to parse the crate dependency graph and split it out into subtrees.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts