This article delves into various techniques for reclaiming disk space from Cargo build artifacts.
Freeing Up Gigabytes: Reclaiming Disk Space from Rust Cargo Builds
https://thisdavej.com/freeing-up-gigabytes-reclaiming-disk-space-from-rust-cargo-builds/
6 Comments
Kissaki@programming.dev · 4 pts · 1y
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.
sugar_in_your_tea@sh.itjust.works · 2 pts · 1y
Yeah, it's nuts. I routinely delete something like 30GB of data after an afternoon of development. Surely this can be improved...
Tenkard@lemmy.ml · 1 pts · 1y
I used to compile zed since there was no Linux binary back then, then I discovered the disk use was 90 GB :|
corpsmoderne@mamot.fr · 0 pts · 1y
@Tenkard @Kissaki only ? That's a bargain 😬
QueenMidna@lemmy.ca · 1 pts · 1y
I've been making extensive use of kondo to do my cleanup for me
onlinepersona@programming.dev · -1 pts · 1y
Or, put target in RAM with cargo-ramdisk. Just don't get yourself an overpriced Mac and pay for extra RAM instead. Save your SSD, stop worrying about rust clutter at the same time, and give a company money that won't lock you in and give your money to Trump. Win win win.
Anti Commercial-AI license