Skip to content

Per-user compiled artifact cache #5931

@djc

Description

@djc

MVP design: cache intermediate artifacts across projects with minimal cache poisoning

  • Only immutable items (registry, git, not path)
  • Idempotent builds (no build script executions + dependents, no proc macro dependents)

Roadmap:

Parallel efforts to improve cache efficiency

Future possibilities

  • Remote cache plugin system
  • Means for proc-macros and build scripts to be cached
    • Pinky promise flag to be cacheable
    • Means for guarenteeing they are only accessing declared resources

Open questions

  • How does this interact with cargo clean?
  • How does this interact with pipelined builds?

I was wondering if anyone has contemplated somehow sharing compiled crates. If I have a number of projects on disk that often have similar dependencies, I'm spending a lot of time recompiling the same packages. (Even correcting for features, compiler flags and compilation profiles.) Would it make sense to store symlinks in ~/.cargo or equivalent pointing to compiled artefacts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cachingArea: caching of dependencies, repositories, and build artifactsS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions