logoalt Hacker News

vishvananda • today at 5:18 AM • 1 reply • view on HN

I'm doing something ambitious. I'm taking a radical approach to improving rust compile times. The reason it is radical is it involves building a brand new rust compiler. This was inspired by a project I started[1] about six months ago to teach agents to build C++ compilers from scratch. I wrote a (long) series of blogs about the process[2].

After iterating on many agent built C++ compilers, I now have a version that compiles about 4x faster than GCC and Clang[3]. I think i can extend the same approach to rust. I'm still a ways from the rust self-hosting stage but early results are promising.

[1]: https://github.com/vishvananda/cppgm-extended

[2]: https://medium.com/@vishvananda/i-spent-2-billion-tokens-wri...

[3]: https://medium.com/@vishvananda/how-i-built-a-compiler-that-...


Replies

adriant93 • today at 5:20 AM

My current Rust program compiles in 25 minutes. So I'm all for this. I believe the world is gravitating more and more towards this programming language. I've read the other day that Discord is rewriting its entire program in Rust for example. A lot of people would benefit from reduced compilation time.

➕ show 1 reply