Next Rust Compiler Jan 25, 2023

submited by
Style Pass
2023-01-26 01:00:08

In Rust in 2023, @nrc floated an idea of a Rust compiler rewrite. As my hobby is writing Rust compiler frontends (1, 2), I have some (but not very many) thoughts here! The post consists of two parts, covering organizational and technical aspects.

Writing a production-grade compiler is not a small endeavor. The questions of who writes the code, who pays the people writing the code, and what’s the economic incentive to fund the work in the first place are quite important.

My naive guesstimate is that Rust is currently at that stage of its life where it’s clear that the language won’t die, and would be deployed quite widely, but where, at the same time, the said deployment didn’t quite happen to the full extent yet. From within the Rust community, it seems like Rust is everywhere. My guess is that from the outside it looks like there’s Rust in at least some places.

In other words, it’s high time to invest substantially into Rust ecosystem, as the risk that the investment sinks completely is relatively low, but the expected growth is still quite high. This makes me think that a next-gen rust compiler isn’t too unlikely: I feel that rustc is stuck in a local optimum, and that, with some boldness, it is possible to deliver something more awesome.

Leave a Comment