Cargo seems to download the same crate at least once per package

Is this true? Does a mechanism to use the same download multiple times exist?

This could help with offline work as well as space savings.

Serde and others are in many of my projects. And they each have many dependencies.

Would it be possible for cargo to mange a downloaded crates folder and handle some version details. (does it already?)

Like obviously the text files aren’t the big thing but i feel that some precompiling could also be included.

Just writing this as my rust folder takes up 40g now and that surprised me.

The downloads should be shared from ~/.cargo/registry/cache, as long as you're not setting CARGO_HOME to something else.

The build artifacts in each project's target/ directory are a different story, and that's probably what's eating so much of your space. You can see some discussion in this other thread:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.