News for hackers. Stuff that matters.
Re:Rust 1.100.0 by jadbox on Thursday November 12, 2026 @02:48PM (#50473144)
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.
Re:Rust 1.100.0 by vlovich123 on Thursday November 12, 2026 @02:53PM (#50473219)
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.

Re:Rust 1.100.0 by jtwaleson on Thursday November 12, 2026 @03:42PM (#50473963)
Best to do some benchmarks for cranelift on your codebases and system. It used to be quite a lot faster, but for me the advantage has disappeared over the last year of Rust improvements.
Re:Rust 1.100.0 by steveklabnik on Thursday November 12, 2026 @02:53PM (#50473220)
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.

Re:Rust 1.100.0 by throwaway27448 on Thursday November 12, 2026 @03:00PM (#50473330)
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.
Re:Rust 1.100.0 by IshKebab on Thursday November 12, 2026 @05:10PM (#50475055)
I don't think you can tell people not to complain about it - it is clearly very desirable to have faster compilation, like Zig or Go.

But that said I do agree it is pretty fast these days. Significantly faster than C++ and people have tolerated that for decades.

Re:Rust 1.100.0 by throwaway27448 on Thursday November 12, 2026 @07:13PM (#50476364)
[delayed]
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @03:03PM (#50473366)
Faster compile and smaller build-dir can be at odds with each other.

That said, this release doesn't include anything more than incremental improvements.

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

Re:Rust 1.100.0 by iknowstuff on Thursday November 12, 2026 @03:58PM (#50474178)
Also

“Relink, don't rebuild” #790

https://github.com/rust-lang/compiler-team/issues/790

Re:Rust 1.100.0 by mohamedkoubaa on Thursday November 12, 2026 @04:50PM (#50474818)
Ive always wondered why this wasn't an option from the beginning
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @07:41PM (#50476603)
To do it right you need

- stable id's even when the source changes

- a separate output file dedicated to it so you hash that

Those aren't free, taking extra work to implement and possibly slow down the compiler

Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @07:42PM (#50476610)
Note that this is a special form of early cut off (which was listed) where you are hashing a more specialized output file, rather than a broader one.
Re:Rust 1.100.0 by pjmlp on Thursday November 12, 2026 @04:31PM (#50474587)
Thanks for the list, looking forward to those improvements.
Re:Rust 1.100.0 by small_model on Thursday November 12, 2026 @03:34PM (#50473821)
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.
Re:Rust 1.100.0 by arl79 on Friday November 13, 2026 @04:46AM (#50480858)
Not only is the compiler very slow, but maintaining the code is slower too. No single tool is right for everything. To me, Rust is definitely not a general-purpose language. It only makes sense for workloads where the ratio of execution time to dev/compile time is heavily skewed toward running the code.
Re:Rust 1.100.0 by kibwen on Friday November 13, 2026 @08:39AM (#50483318)
Nah, compared to other languages, the strictness of Rust makes maintaining codebases a joy. Like, I love Python, but maintaining a large Python codebase is a source of constant anxiety. The Rust compiler actually feels like it has your back.
Re:Rust 1.100.0 by amelius on Thursday November 12, 2026 @03:36PM (#50473866)
There's really a paradox here. Rust claims to be a fast language, but compiling, even without optimizations on, takes ages ...
Re:Rust 1.100.0 by kibwen on Thursday November 12, 2026 @04:15PM (#50474395)
There's no paradox here. You can use any benchmark you like to prove that Rust is a fast language. The work that the compiler does is irrespective of the language that rustc is written in.
Re:Rust 1.100.0 by amelius on Thursday November 12, 2026 @04:20PM (#50474456)
Yes, the benchmark is compiler compiling itself. From scratch and incrementally.
Re:Rust 1.100.0 by kibwen on Thursday November 12, 2026 @05:14PM (#50475110)
Unfortunately, that isn't how any of this works.
Re:Rust 1.100.0 by IshKebab on Thursday November 12, 2026 @05:08PM (#50475022)
That's not a paradox, that's how it always works. Compiling to fast machine code requires more work and takes longer.

Is Python a fast language because it barely takes any time to compile the code? No obviously not.

Re:Rust 1.100.0 by amelius on Thursday November 12, 2026 @05:13PM (#50475088)
You missed "without optimizations on".

This is important, because most often during development you want fast compilation times more than you want fast code.

Re:Rust 1.100.0 by afdbcreid on Thursday November 12, 2026 @05:48PM (#50475517)
That still isn't a paradox. Furthermore it still makes sense: a language designed to generate the fastest code has constructs that cannot be compiled quickly, even without optimizations.

But some of it is implementation problems.

Re:Rust 1.100.0 by adastra22 on Thursday November 12, 2026 @09:25PM (#50477296)
Rust's compilation speed issues are not due to optimizations. There is some intrinsic slowness, but also some boneheaded decisions that are now baked in. E.g. the unit of compilation being the crate, not file/module, makes it so you hit some bad scaling laws. And the borrow checker is SLOW, and unavoidably so, but borrow checking could have been avoided with different lifetime rules. Etc.

I say this as a full-time rust developer btw.

Re:Rust 1.100.0 by aw1621107 on Thursday November 12, 2026 @09:53PM (#50477513)
> And the borrow checker is SLOW, and unavoidably so

IIRC for most codebases borrowck actually makes up a pretty small proportion of compilation time (e.g., see [0] for some admittedly rough estimates).

> but borrow checking could have been avoided with different lifetime rules.

I'm not sure you could entirely avoid borrow checking without a pretty significant change to what you're allowed to do with references.

[0]: https://kobzol.github.io/rust/rustc/2024/03/15/rustc-what-ta...

Re:Rust 1.100.0 by afdbcreid on Friday November 13, 2026 @09:07AM (#50483699)
Rust is indeed not designed for quick compilation. Furthermore and unlike what you said, what makes it memory safe has pretty little to do with that. But what makes it fast definitely has to do with that, which is what I said.
Re:Rust 1.100.0 by Matrixik on Thursday November 12, 2026 @06:34PM (#50475965)
Looks like people extending rust never really focused on compile speed when designing features (from [1]):

> If you could reinvent/change any aspect of Rust, what would you do alternatively?

> A lot happened because we wanted to ship a useful thing with only so much time in the day, so some things were less deliberate than others. There’s an alternate version of Rust with significantly faster compiler times, because while we cared about compile times when designing we always prioritized other values more. We never asked ourselves how this feature or implementation impacted compiler analysis time and there are several spots where something slightly different would have much faster compiler times, which people do care about. But had we spent time on that, we would have neglected other things and not been any more successful.

[1]: https://alexalejandre.com/interviews/interview-with-steve-kl...

Re:Rust 1.100.0 by barchar on Thursday November 12, 2026 @05:09PM (#50475038)
Rust encourages a kind of generic programming that can result in generating too much code.

The compilation model is vastly, vastly, vastly better than languages like C++ and C, though, and it does compile much faster than an equivalent C++ build (doesn't count if you download precompiled binaries of your c++ dependencies)

Re:Rust 1.100.0 by cozzyd on Thursday November 12, 2026 @07:37PM (#50476562)
But the lack of ABI stability means that's not a choice anyway, doesn't it?
Re:Rust 1.100.0 by SAI_Peregrinus on Thursday November 12, 2026 @08:08PM (#50476788)
Rust can compile to dynamic libraries. If you don't use the C abi you have to compile anything that loads them with the same Rust compiler version and target triple. So you need to have some way to guarantee the correct compiler is being used, e.g. Nix or Bazel.
Re:Rust 1.100.0 by cozzyd on Thursday November 12, 2026 @09:32PM (#50477358)
And possibly compilation options?
Re:Rust 1.100.0 by saghm on Thursday November 12, 2026 @09:45PM (#50477444)
Have you been similarly confused by how slow compiling can be for massive C++ projects for decades? I have trouble believing that you genuinely think that's what anyone means by saying Rut is fast.
Re:Rust 1.100.0 by pjmlp on Friday November 13, 2026 @01:11AM (#50479043)
In C++ case usually is the outcome of compiling everything from source, not using binary libraries for dependencies, binary caching, pre-compiled headers, incremental compilation and linking.

Some of the items tend to be rather sub-optimal in UNIX based C++ compilers.

Using Visual C++ or C++ Builder with pre-compiled headers, or modules nowadays, working only on the main application, with everything else compiled as DLLs, COM, or packages (C++ Builder specific), incremental compiler, incremental linking, hot code reloading, is rather fast for the typical compile-debug-fix workflow.

Re:Rust 1.100.0 by saghm on Friday November 13, 2026 @01:18PM (#50487516)
The comment I responded to said "Rust claims to be a fast language, but compiling, even without optimizations on, takes ages". I agree that if you skip compiling and just reuse stuff that was already compiled, then the time it takes to compile C++ is fast, but that's not really what was being discussed.
Re:Rust 1.100.0 by aw1621107 on Thursday November 12, 2026 @09:59PM (#50477583)
> Rust claims to be a fast language, but compiling, even without optimizations on, takes ages ...

As usual, this begs the question of "compared to what"? "Fast" languages obviously don't have some magical ability to guarantee that every program written in them is Blazing Fast(tm); without further inspection one can come to any number of other equally plausible conclusions (e.g., the program is fast for what it does).

Re:Rust 1.100.0 by 0o777 on Thursday November 12, 2026 @03:44PM (#50473997)
All the big AI companies use Rust so this is probably something they should focus on improving.
Re:Rust 1.100.0 by panstromek on Thursday November 12, 2026 @03:56PM (#50474157)
They do fund some of these efforts, yes.
Re:Rust 1.100.0 by eptcyka on Thursday November 12, 2026 @03:58PM (#50474184)
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.
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @04:12PM (#50474348)
Fixed on nightly.
Re:Rust 1.100.0 by adastra22 on Thursday November 12, 2026 @09:19PM (#50477253)
Do you have details? I think I'm running into this.
Re:Rust 1.100.0 by epage on Thursday November 12, 2026 @11:29PM (#50478341)
Re:Rust 1.100.0 by kennykartman on Thursday November 12, 2026 @04:25PM (#50474512)
You might be interested in this: https://news.ycombinator.com/item?id=50458849 - I didn't try it yet, though.
Re:Rust 1.100.0 by shevy-java on Thursday November 12, 2026 @04:55PM (#50474869)
Well, the AI that slops out Rust code won't mind having to wait!
Re:Rust 1.100.0 by jodrellblank on Thursday November 12, 2026 @10:48PM (#50478000)
I dunno why you think your constant comments like this are good quality or interesting reading but can you stop with the one liner “slop slop slop XD XD XD” shitposting please?
Re:Rust 1.100.0 by barchar on Thursday November 12, 2026 @05:05PM (#50474991)
try disabling at least some debug-info for your dependencies.

use cargo's --timings option to identify the slow crates, then use measureme to figure where rustc is spending time.

try fiddling with detached debug-info, dwp files can be smaller than their constituent dwo files.

ensure really small "template wrappers" are inlined.

lower the number of compilation-units you use.

For incremental builds I have found it can _sometimes_ be effective to split out larger dependencies into a dynlib. You create a dylib crate that re-exports said dependencies and your executable depends on that. Ofc things like generics from the offending libraries will still end up in your executables; Though I think there is a way to mitigate this a little.

This mostly helps with link-time, and saving space if you have a bunch of executables (using the argv[0] trick will help more, though).

Re:Rust 1.100.0 by benjiro29 on Thursday November 12, 2026 @05:45PM (#50475488)
Is the compiler any faster now?

If your codebase is not some small project, its excruciating slow. Even if you try different linkers, and other compilers, nothing really make incremental compiles eat so much of your system. Even more so if you have multiple AI agents doing security and other checks.

Switched to Go for several months, and the difference was very noticeable. Until you started to get there also 50k+ files that are interlinked. And let us not talk about Go and Rust their issues with insane amount of debug/cache buildup.

Imaging if you have 4 to 6 agents running that, with each seeing the cache grow from 20, 30, 40 ... To the point that a 100/1000GB SSD grows to 800, 900GB usage. Often in barely a day.

Seen my NVME drive its lifespan drop from 98% to 91% in barely a few month time. I dread looking at it again lol

What was the solution? Going back to C ... Despite right now working on a 800k lines project, it compiles way faster the Go, and well, Rust will have pegged all 16 cores for a minute, for EACH agent trying to recompile on a small change.

Memory safety? Instead of checking at compile time, and wasting my time, this has simply been moved to AI agents checking, making tools, checking, at night. So it does not disturb my own work.

Its ironic, how both modern projects, end up being worse off. Best of all, the C project is way faster then the same project in Go and Rust. Yea, it was "fun" having AI transcompile them twice but the difference on actual large codebase, and not some micro benchmarks is not a joke. To the point that now all my projects have gone back to C...

And yea, i expect some fast downvotes by our Rust friends because saying something negative about Rust always gets people downvoted here. No offence but Rust being linked to LLM and the whole checker was a benefit before AI came around. But now you can offload a lot of safety checks to the backend/offhours, instead of paying for it with every compile.

Re:Rust 1.100.0 by benjiro29 on Friday November 13, 2026 @08:46AM (#50483407)
Thanks for proving my point. Every time there is some criticism of Rust, some people can not help downvoting because they associate their being with a programming language. Such odd behavior...
Re:Rust 1.100.0 by amenhotep on Friday November 13, 2026 @12:09PM (#50486476)
I downvoted this post for complaining about downvotes, and, after you called attention to it, went back and downvoted the previous post for preemptively complaining about downvotes. Hope that helps.
Re:Rust 1.100.0 by pdimitar on Saturday November 14, 2026 @12:53AM (#50494407)
IME you're optimizing for the wrong thing and are taking myopic and short-term-pleasure measures.

I too grind my teeth when programs are slow, especially compilers, but Rust has saved my hide enough times that I accept the slowness of the compiler / linker stack as a necessary price for the peace of mind once the program runs in production.

Plus, they're working on it all the time. Too slow for my taste? Definitely. But it's still okay.

...And stop blaming downvotes on Rust criticisms. You're 10x more likely to get downvoted for attacking an imaginary group or generally sounding like you're flaming.

I found your comment interesting almost until the end, and then I rolled my eyes hard at the final part. Just don't. Keep criticisms informed and you'll get much more interesting replies and reactions.

Seriously. Try it.

(And don't double down on a victim complex either; i.e. your smaller comment under the bigger one.)

Re:Rust 1.100.0 by flykespice on Thursday November 12, 2026 @08:06PM (#50476771)
What the hell are you doing to produce 90gb of temp files? Is that normal on rust land?
Re:Rust 1.100.0 by kstrauser on Thursday November 12, 2026 @09:13PM (#50477211)
No. My target directory is 329GB at the moment. I wish mine were just 90GB.

(And yet I’m perfectly happy running `cargo clean` periodically in exchange for all the Rust loveliness. Sure, I wish I didn’t need to. Sure, I hope it’ll get better. I can live with the temporary inconvenience though.

Also, I’m developing in a tight auto-build-on-commit loop so I have a gazillion builds.)

Re:Rust 1.100.0 by soon_to_be_sb on Thursday November 12, 2026 @11:41PM (#50478432)
Yea, I was thinking the same. 90gb is not that big. Last week I cleared 130gb out of the target dir.
Re:Rust 1.100.0 by simonask on Friday November 13, 2026 @03:44AM (#50480284)
These numbers are totally insane. I've never seen a Rust project with a build cache this large.

Do you have 10 different versions of Tokio included in your project or something?

The project I'm currently working on is quite large, and it's locally cross-compiled to 5 different arch/OS combinations, plus a debug build for the local machine. The build dir is 9.1 GB. I've seen it grow to somewhere around 20 GB, but only after a significant number of dependencies were updated, or the compiler version changed.

A clean debug build of Bevy (a game engine, one of the largest Rust projects around) produces a target dir of around 13 GB. By the way, rebuilding Bevy on my machine takes about 1 minute.

Now, these numbers are still much bigger than I would have preferred, but 329 GB? Get out of here.

Re:Rust 1.100.0 by slopinthebag on Sunday November 15, 2026 @05:29AM (#50505755)
i had a bevy project with a +500gb build folder. i occasionally get out-of-memory warnings and that reminds me to run cargo clean

but i think this is a macos-specific bug that is getting fixed

Re:Rust 1.100.0 by flykespice on Friday November 13, 2026 @07:47AM (#50482749)
329gb?? That is larger than my entire SSD storage.

It would be more believable if you told me you were making your own GTA VI

Re:Rust 1.100.0 by adastra22 on Thursday November 12, 2026 @09:18PM (#50477248)
It's large but not insane. I've got 20gb in a not-too-large repo.
Re:Rust 1.100.0 by a96 on Friday November 13, 2026 @04:49AM (#50480891)
That is frankly insane IMO. 20 MB would be insane unless there's massive libraries or something. 20 GB is the size of a very fat graphical operating system.
Re:Rust 1.100.0 by flykespice on Friday November 13, 2026 @10:10AM (#50484688)
I think even Gradle produce much less cache files...
Re:Rust 1.100.0 by p2detar on Friday November 13, 2026 @12:23PM (#50486663)
[delayed]
Re:Rust 1.100.0 by mixmastamyk on Friday November 13, 2026 @03:40PM (#50489343)
It’s Windows 10 install storage requirement.
Re:Rust 1.100.0 by adastra22 on Friday November 13, 2026 @09:58PM (#50493284)
Exactly, yes. My project uses a GUI framework developed as part of a graphical operating system written in rust. Cargo fetches quite a big subset of that graphical OS in order to build this dependency, which is statically compiled into my app.
Re:Rust 1.100.0 by the8472 on Thursday November 12, 2026 @09:04PM (#50477150)
[delayed]
Re:Rust 1.100.0 by dabinat on Friday November 13, 2026 @04:11AM (#50480508)
I think the main reason Rust gets a bad reputation for compile times is that the compiler makes it very easy to shoot yourself in the foot. When I first started using Rust my compile times for release builds were around 7-8 mins. Then I tweaked some settings and split things up into smaller crates and got it to be under a minute, which was fine for me.

cargo check would still take a long time though, until I realized that I had a build script that was triggering more often that it should, causing Rust to throw out a lot of its work and redo it. Once I fixed that, cargo check was near-instant.

So as a Rust developer you can have decent compile times but only if you (and your dependencies) optimize for it. Hopefully at some point we’ll be able to stop having to think about it, but we’re not there yet.

Re:Rust 1.100.0 by mike1o1 on Friday November 13, 2026 @10:34AM (#50485030)
Do you have an example of some of the compiler/setup changes you made, besides just splitting things into smaller crates, or was that all the organizational changes you made?
Re:Rust 1.100.0 by ytxm on Friday November 13, 2026 @10:34AM (#50485026)
Compiler usually isn't the problem, it's the link stage. Try "wild" linker (it's amazing) and try looser release-like build profiles