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.
cuviper
December 12, 2018, 9:15pm
2
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:
Motivation
I am currently use Rust for almost every thing, including developing software and data analysis. And Rust works pretty well. But Cargo is annoying for building dependencies separately. This is very annoying because:
It slow down the build. Even a small project may spend a long time to build even with full parallelization.
For my use case, I write a lot of data analyzing script/Adhoc projects with Rust. It blows up my disk space really quickly.
When I need to clean the code or build …
1 Like
system
Closed
March 25, 2019, 8:31am
3
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.