Why is #Rust compiler such a piece of crud? Not only it is slow as molasses, but it completely knocks off whole computer. I compile much larger programs with #GCC (I am a #Python interpreter maintainer after all), but it has never been such drama as every other Rust program (vim9jit just killed my computer).

#RustLang

Why doesn’t Rust care more about compiler performance?

Perhaps the most often repeated complaint about Rust is its slow feedback loop and long compilation times. I hear about it all the time; in Rust podcasts, blog posts, surveys, conference talks or offline discussions. I also regularly complain about it, being a Rust user myself!

Kobzol’s blog

@mcepl I suspect you could prevent the compiler from knocking off your computer by passing the flag "-j 1" (quotes not included) to cargo build, to prevent it from using several threads to compile stuff simultaneously. Compilation will be even slower, but it's less likely to crash your computer.

("-j n", where n is the max number of threads you want to allow cargo, also works)

https://www.reddit.com/r/rust/comments/bj6rsp/limit_cargo_build_threads/

@mcepl if we could have dynamic linking and do not build every dependency everytime, it could be a lot faster. But I don't know who will be brave enough to try to package the whole crates.io for any Linux distribution.

@danigm

To be precise, I don’t care that much about the speed … yes, statically linked binaries are blast from the past, I can live with that. However, even #GoLang compiler, which is in the same boat, doesn’t knock of my system.

@mcepl I built large #Rust multiple time and never OoMed 32GB machine. But I had C++ (#Cpp) code that could OoM 64GB machine if parallel jobs haven't been tamed to less than number of CPU cores. So, I find above claim false. 🤷‍♂️