The other day, while running incremental backups on my laptop, I was struck by a familiar yet unwelcome sight: a steady stream of changed files. Despite primarily working on just a few personal Rust projects in my free time, the sheer volume of modifications was significant. It brought back vivid memories of my past Node.js projects and the seemingly ever-expanding universe of node_modules folders.
Digging deeper, the culprit quickly revealed itself: the seemingly innocuous target directory. As the central hub for all build artifacts (compiled binaries, libraries, and intermediate build files) generated by Cargo, Rust’s powerful build system, this folder had quietly ballooned in size. My inner cheapskate cried out! Faster backups, more efficient disk usage – surely Rust, with its reputation for efficiency, wasn’t inherently destined to sprawl across my precious storage?
I’ve been making extensive use of kondo to do my cleanup for me