huacnlee/cargo

Why I built this

Rust is one of the most valuable languages of the AI era: its performance and stability let the apps I build reach users at a very high quality. But compile times and the size of target have troubled me for as long as I have used it.

In the AI era, disk use is a serious problem, and with many worktrees it became my biggest headache. I bought a 2 TB drive for it and that still was not enough, so it got in my way every day. I kept looking for tools and tried kache, mdx and others, but none of them really solved it.

I don't like being held back by limits, and I believed I could solve this. All of it runs on Cargo, so I went straight to Cargo itself and reshaped it around my own ideas and the way we build in the AI era.

It follows how I design products: convention over configuration, the idea from DHH. Developers should not have to think about this at all. Tools like kache and mdx ask for tedious setup; this asks for none. Install it, it replaces the cargo on your computer, and its defaults are tuned for the vast majority of cases.

These changes are aggressive. I don't expect upstream Cargo to accept them, and I don't have much energy to push for that. Upstream has to consider far more, such as support across every platform; I only consider development on macOS, Linux and Windows. So I have fewer worries, and I can go straight at the real problems I run into.

I now run it on four computers: two Linux, one macOS and one Windows. Windows has seen less use, but on Linux and macOS it has run for five days straight. I have not cleaned a target directory once, and my disk has not filled up again, as the screenshot below shows. For me the target disk problem is solved.

Disktree treemap of a home directory: ~/.cargo/targets is 41.7 GB of 99.5 GB, with 711.9 GB of the disk free.
My home directory on Omarchy, November 4, 2026, in Disktree.

What remains is compile speed, which is still somewhat slower than languages like Go. That is a trade I accept: we wait a little, and users get the faster app. And this fork helps there too. Since nothing forces you to delete target anymore, builds no longer start from nothing, and what was compiled before is still there to reuse.

See what changes and the measurements.

My posts on X along the way