this post was submitted on 25 Apr 2025
23 points (100.0% liked)

Rust

6872 readers
13 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS
 

This article delves into various techniques for reclaiming disk space from Cargo build artifacts.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 week ago (2 children)

I changed the cargo home/cache directory so it's easier to clean up. The disk space pollution of Rust is insane.

I did a small project project that resulted in an 8 MB executable. And had dozens of gigabytes to clean up.

Even more confusing was how closing VS Code lead to 11 GBs being freed. I initially had three or four projects open for reference in APIs and API usage. But my primary partition ran full quickly. In the end I used Rover and minimized IDE usage to two instances. And after my work, removed target and cargo build data again so I actually have space to work with on my primary partition.

[–] [email protected] 2 points 4 days ago

Yeah, it's nuts. I routinely delete something like 30GB of data after an afternoon of development. Surely this can be improved...

[–] [email protected] 1 points 1 week ago* (last edited 1 week ago) (1 children)

I used to compile zed since there was no Linux binary back then, then I discovered the disk use was 90 GB :|

[–] [email protected] 0 points 1 week ago

@Tenkard @Kissaki only ? That's a bargain 😬