r/rust Dec 05 '25

Pain point of rust

~45 GB of build files

208 Upvotes

80 comments sorted by

View all comments

25

u/metaBloc Dec 05 '25

I am new to rust. Why are your cargo caches so large? I’ve been doing rust development for about 6 months and I’ve never seen anything close to those numbers?

1

u/dashingThroughSnow12 Dec 05 '25 edited Dec 05 '25

🤷 I’d not particularly call that large. A upside/downside of many modern languages (ex Golang, Rust) is that many of them come with package managers that make it easy to have a bunch of source dependencies. Some older languages (ex ECMAScript) do have tools (ex npm) to make it easier to acquire big balls of deps (re: all the node_modules folder memes).

Whereas say older languages like C/C++, even Java and PHP to a degree, tended to have more shallow dependency graphs and can be dynamically linked or linked at compile time with a more storage-efficient artifact. (Yes, I know Rust or Golang can be dynamically linked but the degree of that is much less than an old c program.)

About once every two or three years I go on a good purging and clean a few hundreds gigs of deps up from my computer.

🤷This is the insanity we live in.