At first glance, this looks like an odd partnership: Mozilla just announced that it has recently begun collaborating with Samsung on Servo, its next generation browser engine. Mozilla Research started working on Servo as a research project in 2012. The new browser engine, which is still far away from being available in any commercial project, is written in Rust, a relatively new programming language that is also being developed by Mozilla Research. Together, Mozilla and Samsung are bringing both Rust and Servo to Android and the ARM architecture.
Samsung, a company spokesperson said, is interested in this project because the company is “investigating various new technologies to innovate legacy products. This collaboration will bring an opportunity to open a new era of future web experience.”
Browser Engines In The Age Of Multicore Computing
As Eich stressed, however, just parallelizing one part of the browser and rendering pipeline isn’t good enough. Only a web engine “that’s parallelized deeply from end-to-end,” he told me, will be able to fully take advantage of tomorrow’s processors with 16, 32 or even more cores.
Samsung, of course, is also working on bringing ever more powerful multicore processors to its mobile phones, so a partnership with Mozilla to make better use of these cores seems like a good fit. This collaboration, however, will also surely raise some questions about Samsung’s relationship with Google, given Chrome’s strong position as the leading mobile browser on Android today.
Rust And Servo
That’s where Rust comes in (and Mozilla is launching version 0.6 of the compiler and associated tools today). Rust, which shares similarities with C++, Lisp, Erlang and a number of other languages. The focus of Rust is on safety (especially when it comes to memory management errors, something that’s often an issue with C++) and concurrency. Rust, Mozilla says, “is an attempt to create a modern language that can replace C++ for many uses while being less prone to the types of errors that lead to crashes and security vulnerabilities.” Later this year, once all the core libraries are in place, Mozilla plans to launch Rust 1.0. Currently about five or six people are working on the project at Mozilla and another ten to twenty at Samsung.
The Future Of Gecko
With Gecko, Mozilla already has a pretty capable engine for its browser and Firefox OS, but the plan isn’t to completely replace Gecko with Servo at this point. Instead, it seems more likely that Mozilla will use Servo as a “new thing for new hardware,” Eich told me. Given the popularity of Firefox, Mozilla can’t just push Gecko forward without breaking a lot of things, but with Firefox OS, for example, the organization was able to shed some of these constraints and introduce new features to its engine. Servo, Eich believes, will teach Mozilla a lot that it can also use in Gecko.