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

I hope Rust can eventually reach compile speeds of most module based languages.

Every time I update my netbook with a new Rust release it takes a few hours, it almost feels like I am compiling KDE or something.



The compiler is pretty slow (although there's a big drive starting a few days ago to get certain aspects down (mostly compiling small files); because running the testsuite is so slow that work on the compiler is getting dragged down), but compiling the compiler itself is particularly bad:

- it has to build LLVM: Rust currently has to use a custom version; the goal is for this to be unnecessary so that the system LLVM is ok.

- it has to build itself and the standard libraries 3 times: rustc is written in Rust; so it has to bootstrap.

- it eats a lot of memory, so bootstrapping on low memory systems is bad. Much of this is historical; the bootstrapped code means that large portions of the compiler are written when the language was less developed, and so is very non-idiomatic. It's progessively being modernised

The first and last can be fixed; the second can't, at least until there are binary releases.


I understand the reasons behind it.

Given my experience with compiler development, back when I was in the university, my expectations is that the second point would be pretty fast anyway, if the first and last issues are solved.

I have good experience with languages that use modules, some of them had bootstraped compilers like the Oberon family.

That is why I said I am hoping for these issues to be solved, as I think building LLVM is the main culprit.


What does it use for the first-stage bootstrap, out of interest?


There are periodic (made when someone feels like it, normally every one or two weeks) snapshots, i.e. a normal bootstrap saved as a binary, of the current master branch, which are uploaded to rust-lang.org, and downloaded (once, they are cached) when building a revision that requires that snap.




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

Search: