logoalt Hacker News

jadbox • today at 7:48 PM • 9 replies • view on HN

Is the compiler any faster now? Compiling takes forever. I'm also tired of always having to do "cargo clean" everyday to clear out 90gb of temp files.


Replies

epage • today at 8:03 PM

Faster compile and smaller build-dir can be at odds with each other.

That said, this release includes some incremental improvements as well as the unused-dependency lint to help reduce wasted work within the ecosystem.

Some changes that have been or are about to be merged for upcoming releases

- We will be reducing the debug info generated for the `dev` profile which reduces build-dir size and speeds up builds. We've split off a `debug` profile for when that is needed.

- Cargo will be deleting the directory rustc writes before each invocation, avoiding the leaking of debug files when split-debug is enabled (default on Mac)

- rlibs for workspace members will no longer be copied from build-dir to target-dir which takes up extra space on systems without hardlinking or where we skip it (like Mac)

- redundant information in rlibs and rmeta's is going to be de-duplicated

Examples of further out changes

- This release includes the foundational work to add a build-dir GC

- Cross-workspace de-duplicating of build-dirs

- Cross-workspace build-dir cache

- Early cut off

➕ show 2 replies
kennykartman • today at 9:25 PM

You might be interested in this: https://news.ycombinator.com/item?id=50458849 - I didn't try it yet, though.

steveklabnik • today at 7:53 PM

Compiler speed is continually being worked on https://nnethercote.github.io/2026/11/04/how-to-speed-up-the...

And the large target directories is also being worked on as well.

vlovich123 • today at 7:53 PM

Any faster vs what baseline? They’ve constantly made improvements and Rust today is pretty darn quick, especially for incremental. There’s work to parallelize the front end which will help a little bit and you can always use the cranelift backend for debugging which is substantially faster than LLVM.

They’re also doing work to reduce the amount of disk space usage (by clearing out unused articacts) and make it easier to maintain.

➕ show 1 reply
amelius • today at 8:36 PM

There's really a paradox here. Rust claims to be a fast language, but compiling, even without optimizations on, takes ages ...

➕ show 1 reply
eptcyka • today at 8:58 PM

On macOS there is a known bug where some temp files are always created anew, not reused, which slows down compilation and wastes more space than other platforms.

➕ show 1 reply
small_model • today at 8:34 PM

Yes this is why I switched to Go for backend, much faster compiling and performance isn't an issue for the application yes using 100GB+ is just bad tooling.

0o777 • today at 8:44 PM

All the big AI companies use Rust so this is probably something they should focus on improving.

➕ show 1 reply
throwaway27448 • today at 8:00 PM

I don't understand why people complain about this non-stop. If compilation time is such an issue use a different language. I can't say I've been bottlenecked by compilation in a very long time.