Skip to main content

Firefox 48 gets a new media component that’s a little ‘rusty’

firefox 55 adds webvr support
Kārlis Dambrāns/Flickr
What’s brand new and already a little rusty?

The latest version of the Firefox browser for the desktop will have a component based on the new Mozilla-backed Rust language, said Dave Herman, a principal researcher and director of strategy at Mozilla this week. Rust is billed as an alternative to C++, and promises that programmers can be more productive and suffer less headaches regarding troublesome memory exploits.

According to the post, Firefox 48 will include Mozilla’s first Rust media parser. Herman doesn’t really detail much in regards to this new component, only saying that it performs “beautifully” and delivers “identical results” when compared to the original C++ component the Rust version is replacing. A provided chart shows that Mozilla experienced absolutely no issues while running the new Rust code over a billion times.

“Seeing Rust code ship in production at Mozilla feels like the culmination of a long journey,” Herman writes. “But this is only the first step for Mozilla.”

So what’s the big deal with this new media parser? It enables web surfers to stream digital media to their browser or related app. As Herman explains in his blog, that media-based data resides on a remote server, and is created by someone the user doesn’t know (or possibly trust). That data is thus delivered in a “complex format” that’s analyzed by the parser component of the receiving software, such as a browser.

Unfortunately, streaming media can be used to exploit memory management bugs residing within a web browser’s code. Herman points as an example to this Android exploit, which enabled remote attackers to “execute arbitrary code or cause a denial of service (memory corruption)” by using a malicious media file. That example seems to be the latest in a long string of bugs associated with the Stagefright “epidemic” spanning from Android 2.2 “Froyo” to Android 5.1 “Lollipop.”

“This makes a memory-safe programming language like Rust a compelling addition to Mozilla’s tool-chest for protecting against potentially malicious media content on the web,” Herman adds. Nicholas Matsakis, a senior researcher at Mozilla Research, explained a few years ago that Rust “guarantees type soundness, memory safety, and data-race freedom.”

Rust made its first public appearance back in 2010. It’s the brainchild of Mozilla employee Graydon Hoare, a personal project that Mozilla began to sponsor in 2009. The first numbered pre-alpha Rust compiler went publicly live in January 2012 while the first stable release of the programming language (Rust 1.0) hit the streets in May 2015.

“Rust itself is the product of a tremendous, vibrant community,” he adds. “None of this work would have been possible without the incredible contributions of issues, design, code, and so much more of Rustaceans worldwide. As a Rustacean myself, I’d encourage you to come play with Rust.”

Developers are encouraged to get involved with a Mozilla project using the new Rust programming language. Herman points to Oxidation, a project for integrating Rust code into Gecko and Firefox. Listed components include an URL parser, an MP4 metadata parser, a WebM demuxer, CSS-style calculation, and more.

The current version of Firefox for desktop appears to be v47.0.1. Additionally, the Firefox 48.0Beta release notes state that it arrived on the web on June 8, thus Herman’s blog seems to indicate that the Rust component is already present within the current beta release. That said, once Firefox 48 stable hits the masses, Rust code will be in use by “hundreds of millions” of Firefox users.

Editors' Recommendations

Kevin Parrish
Former Digital Trends Contributor
Kevin started taking PCs apart in the 90s when Quake was on the way and his PC lacked the required components. Since then…
How to change your language in Google Chrome on desktop
Chrome OS

Google Chrome supports a wide range of languages. While it'll default to English in most cases, there's nothing stopping you from changing its settings and displaying pages in Spanish, French, or dozens of other languages.

Changing your default language in Chrome takes only a few seconds, and the technique used is the same across Windows and Mac. Aside from changing your language, note that Chrome now gives you the option to automatically translate pages written in another language – making it easy to read content from around the globe.

Read more
23 of the best Netflix hacks, tips, and tricks
The Netflix home screen.

Netflix is one of the most popular streaming platforms for all things movies and TV shows. Home to an immense library of titles, the Netflix archive is constantly changing and evolving, and so are the many ways you can use your Netflix account. 

For instance, did you know you can access region-locked Netflix shows and flicks by using a VPN? Or that you can disable that pesky Autoplay feature? There are tons of Netflix hacks, tips, and tricks out there, so we’ve gone ahead and rounded up all of our favorites! 
Expand your streaming with a VPN

Read more
How to make a GIF from a YouTube video
woman sitting and using laptop

Sometimes, whether you're chatting with friends or posting on social media, words just aren't enough -- you need a GIF to fully convey your feelings. If there's a moment from a YouTube video that you want to snip into a GIF, the good news is that you don't need complex software to so it. There are now a bunch of ways to make a GIF from a YouTube video right in your browser.

If you want to use desktop software like Photoshop to make a GIF, then you'll need to download the YouTube video first before you can start making a GIF. However, if you don't want to go through that bother then there are several ways you can make a GIF right in your browser, without the need to download anything. That's ideal if you're working with a low-specced laptop or on a phone, as all the processing to make the GIF is done in the cloud rather than on your machine. With these options you can make quick and fun GIFs from YouTube videos in just a few minutes.
Use GIFs.com for great customization
Step 1: Find the YouTube video that you want to turn into a GIF (perhaps a NASA archive?) and copy its URL.

Read more