📜 ⬆️ ⬇️

Rust code is included in Firefox 48

The component written in Rust for the first time replaced the component with C ++ in the Firefox browser, and this is only the beginning!

Mozilla loves Rust


It's hard to believe that almost seven years have passed since Mozilla Research first began to sponsor the development of Rust , a system programming language aimed at the safe work with memory, speed and parallel execution of code. At the time, it was nothing more than an ambitious research experiment, around which a small but devoted community was formed. Surprisingly, despite the long history of inventions and discoveries, Rust has retained its key principles. Initially, the developers wanted to create a secure alternative to C ++, improve the efficiency of system programming, protect critical software from memory exploits, simplify working with parallel algorithms — this is why Mozilla supported the Rust project and, eventually, started using Rust in a stable browser version.

Equally promising is the fact that the security and modern features of Rust attract new people to system programming. For Mozilla, where community collaboration is literally spelled out in our mission , expanding the circle of developers is vital.

So I am pleased to note an important milestone: in Firefox 48, Mozilla will enable the first component on Rust for all desktop platforms , and Android support will soon appear.
')

The introduction of Rust in the Moisilla medistek


One of the first to use Rust in Mozilla was the Media Playback team. Now it is quite obvious that media is a key element of work in the modern web. What may not be so obvious for non-paranoid is that every time a seemingly harmless, at first glance, video (say, like a chameleon bursts bubbles ), the browser reads data in a complex format and created by someone you don’t you know and who you do not trust. As it turns out, using media formats you can manipulate decoders and pull out unpleasant security vulnerabilities . They exploit bugs in the memory management mechanism, which is implemented in the code of web browsers.

For this reason , a memory-safe programming language like Rust is becoming an inseparable addition to the Mozilla toolkit to protect against potentially harmful media content on the web. For this reason, Ralph Giles (Ralph Giles) and Matthew Gregan (Matthew Gregan) developed in Mozilla the first media parser on Rust . And I am pleased to announce that their code will become the first component on Rust, which will be included in Firefox. This is also a real achievement for the Rust community: the Rust code will run on hundreds of millions of computers on Firefox users . Our preliminary studies show that the component on Rust perfectly manifests itself and is not inferior to the original component in C ++, the place of which it will take - but now it is implemented in a memory-safe programming language.


Telefoet Firefox does not show a single problem in more than a billion launches of new code on Rust

More to come!


Many people deserve great gratitude for the help. Ralph Gilles and Matthew Gregan implemented the component, and Nathan Froyd, Nick Nethercote, Ted Mielczarek, Gregory Szorc, and Alex Crichton contributed to the integration of Rust into the Firexx in his instrumental system, and also provided his support on all platforms.

Rust itself is a product of an amazing, vibrant community. None of this work would have been possible without incredible help in solving problems , developing architecture , code, and much more that Rust devotees from around the world did. Being myself so , I want to call you to try Rust. Now is the time to start and participate in the Mozilla project using Rust .

Seeing the Rust code in the stable version of the Firefox browser is like the end of a long journey. But this is only the first step for Mozilla. Follow the news!

About the author: Dave Herman - Chief Scientist and Strategy Director, Mozilla Research

Source: https://habr.com/ru/post/305536/


All Articles