Categories: Firefox

Put your Trust in Rust – Shipping Now in Firefox

At Mozilla, security is one of our highest priorities, as the openness and accessibility of the Internet are threatened when user safety and privacy is not protected. Seven years ago we began sponsoring the development of the Rust programming language, with the vision of building a systems programming language that emphasizes security, speed, and parallelism. Parallelism means that multiple CPU cores can execute different code at the same time, and it makes for computing that is more powerful and efficient.

Trustworthy browser

With many languages, writing parallel programs is a challenge because developers have to go to great lengths to avoid errors. This means the code has a higher probability of containing bugs, which can lead to security vulnerabilities — and a single programming mistake can be greatly damaging to web security, like a leak in a dam.

Rust, as a memory-safe programming language, solves this because it’s able to check source code before it’s converted (or “compiled”) into low-level instructions, making it far easier for developers to write programs with confidence that the code is safe. This feature is akin to having a guardian angel watching over your work, pointing out errors and guiding you towards safe and secure code. This empowers developers to feel more comfortable and confident in building parallel algorithms, which with Project Quantum — our effort to develop Mozilla’s future web engine — will greatly speed up the browser.

Last summer, with the release of Firefox 48, we shipped the very first browser component to be written in the Rust programming language — an MP4 parser for video files. Streaming media files in your browser can be particularly risky if you don’t know or trust the source of the file, as these can maliciously take advantage of bugs in a browser’s code. Rust’s memory-safe capabilities prevent these vulnerabilities from being built into the code in the first place.

We’re proud to have helped create a language that will power our next-generation browser and put user security and privacy first.