Mozilla binds Firefox's fate to the Rust language

Latest version of Firefox will require Rust to compile successfully, restricting the number of platforms that the browser can be ported to

Mozilla links Firefox's fate to the Rust language
cortixxx (CC0)

Mozilla always intended for Rust to be used in building key parts of the Firefox browser. Now the company is committing to that vision in a significant manner.

After version 53, Firefox will require Rust to compile successfully, due to the presence of Firefox components built with the language. But this decision may restrict the number of platforms that Firefox can be ported to—for now.

Rust, Mozilla Research's language for fast and safe system-level programming, is on the eve of a new release. Rust 1.15’s most notable new feature is a revamped build system written in Rust and using Rust’s native Cargo package management. Previously, Rust was built with makefiles; with this change, Rust can be built using Cargo “crates” like any other Rust project. It’s one of many steps that Rust has taken toward becoming its own ecosystem, not dependent on pieces built by others.

As Rust has matured and stabilized, it’s become easier for Firefox developers to move more of the browser’s critical infrastructure to that language. But there's a downside: Any platform where you intend to build and run Firefox will need a working edition of the Rust compiler.

Rust is meant to be cross-platform, so this should be possible. However, the practical implications are more complex. Rust depends on LLVM, which has dependencies of its own—and all of them would need to be supported on the target platform.

A discussion on the Bugzilla tracker for Firefox raises many of these points. Other concerns also bubbled up: What about proper support for Linux distributions with long-term support, where the tools available on the distro are often frozen, and where newer Rust features might not be available? What about support for Firefox on "non-tier-1" platforms, which make up a smaller share of Firefox users?

Mozilla’s stance is that in the long run, the pain of transition will be worth it. "The advantage of using Rust is too great,” according to maintainer Ted Mielczarek. “We normally don’t go out of our way to make life harder for people maintaining Firefox ports, but in this case we can’t let lesser-used platforms restrict us from using Rust in Firefox,” he wrote.

The platforms most likely to be affected by this decision, according to a discussion in the Bugzilla thread, are nondesktop architectures like IBM’s S390. As a result, it’s possible that those who ship Linux distributions for those architectures—as Red Hat does with Fedora—will simply drop Firefox support for the builds that do not yet fully support Rust.

Most Firefox users won’t be affected by this. The best hope for those who are, will be to marshal efforts to build out whatever platforms need Rust support—simultaneously driving development for both Firefox and Rust.

Conventional Firefox users, though, care more about the end result—a promised rejuvenation that will keep the browser speedy and feature-competitive—and less about the technology used to accomplish it. The pressure’s on not only to move to Rust, but to prove the move was worth it.