No kidding. I’ve been waiting for the solver at least half that decade now. Hopefully it and Polonius unblock specialization which has been in purgatory for years.
2026 is an exciting year for the Rust compiler (and me) (yoyo-code.com)
throwup238 6 hours ago
panstromek 4 hours ago
It's not directly blocked on the solver, but getting the type system into a better shape definitely helps reasoning about the soundness issues involved.
afdbcreid 17 minutes ago
yhjc2692 7 hours ago
thomashabets2 7 hours ago
$ du -hcs target/
190G target/bitbasher 5 hours ago
simonask 5 hours ago
rapind 5 hours ago
It's been a journey...
panstromek 4 hours ago
Do you have some more info about the codebase, is it public?
stymaar 5 hours ago
There's a recurring meme here and in other social media about rust being slow to compile, but anyone who's worked with Rust know that target dirs are a much more annoying papercut in practice than the relative speed of the compiler (which isn't appreciably worse than any other toolchain out there for the most common workflows).
rapind 5 hours ago
estebank 4 hours ago
epage 3 hours ago
colechristensen 4 hours ago
I had to abandon several projects until I bought a significantly beefier computer because of disk space, which is ridiculous. A lot of it was rust target directories taking up tens of gigabytes.
rapind an hour ago
RAM prices are insane right now...
d0mine 5 hours ago
Filligree 4 hours ago
colechristensen 3 hours ago
My favorite improvement example was something a bit of a slog was taking 20 minutes in python, I told the agent to rewrite it in rust and the result was 300,000 times faster... 20 minutes to ones of milliseconds. Obviously not just a python problem but better solutions just seem to fall out of Rust and Python is just slow.
maccard 3 hours ago
Funnily enough, last week I was working on parsing some json. I wrote a little script in python, tested it and then ran it over the main dataset. It took so long that I rewrote it in C# before the python script had finished!
anonymous908213 4 hours ago
simonask 4 hours ago
Stories like this make me think something is wrong with your setup. Do you have Windows Defender or similar enabled on the build directory?
aliasxneo 3 hours ago
Doesn't mean one is better than the other, but to find it odd someone had an experience with slow Rust compiliations and then blame it on their setup is a bit odd.
okanat 2 hours ago
Most of the Rust ecosystem makes unnecessarily heavy use of compile-time traits and monomorphized generics (aka Go generics or C++ templates). The language syntax encourages it as well. The thing is compile times will NEVER drop to level of Go unless the entire set of players (language, standard library, almost all library developers) actually prioritize dynamic dispatching instead of static dispatching / monomorphization. That's the tradeoff for the performance and RAM usage you gain. Template-heavy C++ also suffers from the same issues for the same reason.
Golang is fast to compile because its interface definitions are runtime/dynamically dispatched (aka `&dyn Trait` in Rust or virtual classes in C++) and it had no generics for a long time forcing types like slices, map and vectors to be magic types.
If you need fast compile times, you need to split your program into multiple binaries or write your own backend ecosystem that almost only uses dynamic dispatching. If your full Cargo dependency tree pulls 50+ crates, you'll not get fast compile times. You need to avoid derive-macros like plague. You need to use non-Cargo build systems or `build.rs` to generate Rust code instead of derive-macros.
Unlike Golang Rust also targets extremely memory constrained devices where monomorphization enables memory savings, extra optimizations and fewer CPU cycles / instructions (e.g. microcontrollers, UEFI/BIOS implementation). It is a system programming language first. With system programming languages you are responsible for these choices as the developer. Rust just happens to have a vivid scene of backend libraries since the language's safety enabled many non-system developers to write correct and performant programs quickly.
simonask 2 hours ago
afdbcreid 11 minutes ago
But 15 minutes? Even rustc doesn't take that long (on a powerful computer), and that's a very large program that is compiled at least twice (bootstrapping)! That's just poor engineering, not knowing how to write fast-to-compile Rust code.
shakna 2 hours ago
That isn't "Rust compiles are fast", it's another example of "Rust requires you architect your code a specific way".
yosefk an hour ago
afdbcreid 13 minutes ago
And neither the original example is "Rust compiles extremely slowly" (it does compile slowly), it's another example of "vibecoded software is of poor quality".
xyzzy_plugh 3 hours ago
One proposal I came across actually suggested breaking up a perfectly fine monolith into a dozen microservices to reduce compile times (at the cost of cumulative CI costs going up).
When the alternative is massively rearchitecting your systems, Zig and Go begin to look really nice by comparison.
yosefk an hour ago
iknowstuff an hour ago
stymaar 44 minutes ago
I have no idea how this could possibly be this bad given that I worked full time with Rust from 2015 to 2023 on a $600 Clevo laptop from 2012 and was used to incremental builds in the low double digit seconds for projects ranging between 100k and 600k loc. (From scratch release builds where excruciatingly slow, but these only happened once every rust updates).
afdbcreid 15 minutes ago
MBCook 5 hours ago
estebank 4 hours ago
A lot of those things are in different stages of being fixed. I would personally want the default for generated debug information to be changed. cargo gc will help with running out of disk space. Better cross-project reuse of existing rlibs could be accomplished with some better tracking of optional features that can be unified (think having `serde` with feature `derive` enabled in one project, and having it without it in another: features are supposed to be purely additive, so you could reuse the earlier rlib on the later, but in practice people (ab?)use features in non-additive ways so it isn't straighforward to do something like that by default). Tools like hakari lets you create workspace-unified Cargo.toml to emulate this behavior.
yhjc2692 3 hours ago
infogulch 2 hours ago
estebank 2 hours ago
fn needs_string_like(x: Into<String>) {
fn actual_logic(_: String) {}
actual_logic(x.into())
}
which is the explicit way of representing the same thing rustc would be doing automatically. The above will create an almost empty `needs_string_like` for each type that it is called with, but a single `actual_logic`. IIRC some optimization passess would completely remove specific instances of `needs_string_like` (like if you call `needs_string_like(String::new())`).panstromek an hour ago
I assume you ask about polymorphization, which is a term used to refer to a specific optimization mentioned in the blog post.
The base version which Rust wants the most makes sense to enable by default for all builds, because it's purely just removing duplicate work - this is for cases like Vec<u64> and Vec<i64>, where we currently emit code for each one separately, even though it's pretty much the same for both.
More general version will make sense for debug builds or in some special cases, like when optimizing for size. I believe people also want to experiment with it for some interop use cases (and for that, it'd be useful to have source level annotation). I think it's too early to tell how all of this is going to look like, though.
panstromek 8 hours ago
tialaramex 7 hours ago
hmokiguess 7 hours ago
Not implying to compare Rust and Ruby, just mainly observing how these two things came out near each other in the present day.
anonymous908213 4 hours ago
hmokiguess 3 hours ago
KolmogorovComp an hour ago
archermarks 12 minutes ago
LoganDark an hour ago
shmerl an hour ago
afdbcreid 8 minutes ago
vatsachak 5 hours ago
cpursley 4 hours ago
vatsachak 4 hours ago
lolakutty 5 hours ago
satvikpendem 5 hours ago
lolakutty 5 hours ago
I don't like rust because
1. Verbose Syntax made worse by having to include type system info... 2. Dumb Borrow checker 3. Automagic stuff...
Sharlin 3 hours ago
lolakutty 2 hours ago
esafak an hour ago
ikety 5 hours ago
lolakutty 5 hours ago
simonask 4 hours ago
lolakutty an hour ago
afdbcreid 6 minutes ago
And I prefer to work with Rust than both anyway. Such advancement (if it will happen) will only make other languages like Zig feasible for me.