Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not have a central directory to store all the built crates? #6711

Closed
ohsayan opened this issue Mar 3, 2019 · 1 comment
Closed

Why not have a central directory to store all the built crates? #6711

ohsayan opened this issue Mar 3, 2019 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@ohsayan
Copy link

ohsayan commented Mar 3, 2019

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 called rand_super and rand_awesome then both of the projects would be given their own copies of rand. 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 like cargo add <http://url/to/crate>. The crate URL can simply be the crates.io URL say for rand it could be something like cargo 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?

@ohsayan ohsayan added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Mar 3, 2019
@dwijnand
Copy link
Member

dwijnand commented Mar 3, 2019

Configuring the target directory for built crates is already implemented. This is a duplicate of #482, which has been implemented.

See

for more info and thoughts on this.

@dwijnand dwijnand closed this as completed Mar 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Projects
None yet
Development

No branches or pull requests

2 participants