Why not have a central directory to store all the built crates? #6711
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Cargo creates a copy of the dependencies for every project built. Let's say I was using the
rand
crate. If I created a project calledrand_super
andrand_awesome
then both of the projects would be given their own copies ofrand
. So why don't we create some kind of central directory for the already downloaded crates, let's say we have ~/.rustup/crates.io/crates/ or something like that and we store all the deps that are downloaded. Then it doesn't need to be downloaded for each project individually. And we can have a command likecargo add <http://url/to/crate>
. The crate URL can simply be the crates.io URL say forrand
it could be something likecargo add https://crates.io/crates/rand/0.6.5/
. This would be a great advantage. I'll work on this and try to create an experimental version of cargo with this feature. Thoughts?The text was updated successfully, but these errors were encountered: