Why did Mozilla adopt Rust?

So why did Mozilla adopt Rust?

I have picked up a bit of Rust history from various presentations on YouTube and elsewhere. As far as I can make out Rust has changed a lot since it's inception, originally it had garbage collection, it had a complex run time, there was no borrow checker. It was not suitable as a systems programming language.

Perhaps I'm missing some other fine features Rust had back then but this makes it sound it was just another programming language with nothing much notable to distinguish it from the thousands of others, old and new.

So I'm curious, what was the turning point that convinced Mozilla to get behind Rust? Why? When?

As it turns out Rust seems to be unique in checking of aliasing and lifetimes whilst being as performant as C/C++.

Aside: Tangentially I was thinking of the Turning Machine. In definitions of the Turing Machine I have seen that infinitely long tape that it uses starts out initialized to some symbol, "blank" for example. That means that a Turing Machine is totally deterministic in operation.

Now, with many programming languages it is quite possible to use uninitialized memory, be that by simply not initializing something before use, or using rogue pointers, or whatever. That means that most source code texts one can create that actually compile are random number generators rather than deterministically executing programs.

As far as I can tell, Rust with it's type and borrow checking does actually give us a Turing Machine.

Which I find hugely significant.

1 Like

For the reference, the earliest slide deck about Rust: http://venge.net/graydon/talks/intro-talk-2.pdf


Also, Wiki has a good history section: https://en.wikipedia.org/wiki/Rust_(programming_language)

and the reference section has lot of articles.

Hi! I was a Mozilla employee from 2010 through 2019, and a member of the Servo team from 2014 to 2018. I was at the first-ever presentations of Rust and Servo (at the 2010 Mozilla Summit), and started playing with and contributing to Rust that same week. At that time, Rust's design still included a sort of Erlang-like runtime with green threads, supervision trees, actor-style concurrency, etc. (plus some other features that were later dropped, like typestate).

Some time earlier in 2010, Graydon had showed some fellow Mozillians the language he'd been working on alone for a few years, and convinced the leadership that it could become a good tool for replacing C++ code in future projects, because of its designs for safe fast concurrent programs. (Browser developers are perhaps more aware than anyone else in the world of both the benefits and the dangers of C and C++.) In particular, the management of the Mozilla Research department bought into the project, as did then-CTO Brendan Eich (whom the head of Research reported to). After Graydon unveiled the Rust language, Brendan announced the start of the Servo project ("Mozilla's next-generation browser engine, written in Rust") in a keynote presentation later the same week.

Rust and Servo started life at Mozilla Research almost as a single project, with many of the same people working on both codebases in tandem. Servo was a testbed where Rust could prove its fitness, and also also acted as the environment that shaped Rust's evolution. Designing and refining Rust to work well for Servo ensured that it became a language suitable for writing high-performance browser components. Of course, as more people began using and contributing to Rust it gained other influences (sometimes conflicting ones), but Servo remained (and remains) one of the major drivers of Rust development.

So Mozilla basically committed to Rust long before it became the language that it is today, but also adopted a strategy to evolve it into a suitable language for Mozilla's future needs. Of course there was no guarantee that Rust and Servo would be successful; that only happened many years later, most notably in 2017 when Servo's CSS engine began shipping inside of Firefox. Developing both the language and the engine as research projects for many years before that allowed both of them the time to find the right designs and grow mature enough for production use.


Ah, thanks for those glimpses into Rust history.

What I gather from all that is that the philosophy/intentions/requirements behind Rust were in place from the beginning, safe, fast, concurrent, even if the means of achieving that has changed significantly along the way.

Safe, fast, concurrent is certainly a pull for browser developers I imagine. Developers of real-time, safety critical, embedded systems have similar needs, though somehow they never seem made the leap to realizing a language to achieve that. (Yeah, I know, Ada...)

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.