Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Poor computer security poses an existential threat to modern civilization. Slow-ish compile times do not.


I'd heard that the Rust compiler can't compile itself on a 32 bit machine with maxed out RAM.

I know there have been some changes to shrink memory usage for a bunch of data types in Rust but it's not clear if that has changed this limitation.

I'm trying to learn Rust now, and one of my eventual goals is to look into heap analysis of the compiler, because I agree this is some bullshit.

I want to run stuff on ARM eventually and cross compilation and transfer don't sound like my idea of a good time.


This is not entirely a rustc issue; LLVM is a huge part of this as well. Sometimes, some steps need more than four gigs of RAM. loc says that rustc has 1.4 million lines of Rust, and LLVM has 5 million of C++. It's just a huge project.

In the past, people have reported these things, and we've tried to fix or help where possible; see the discussion on https://github.com/rust-lang/rust/issues/60294 for example.


You would only need cross compilation of your project is as big as rustc, but if it were you would likely want the fastest available machine at your disposal and a lot of effort is poured into making cross compilation as painless as possible.

Making rustc compilable in a 32bits host might be a good idea, but it is far from a priority. If that is a deal breaker, as it is for OpenBSD for example, Rust is certainly a language that you should look at in the short term.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: