Mozilla's goals seemed quixotic at best when its research arm decided last year to put its brain power behind a new programming language called Rust.
However, Rust and its Servo testbed on GitHub apparently are now far enough along that no less than Samsung has committed some engineering know-how to its success, the companies announced today. Rust also has reached version 0.6.
Rust is an attempt to create a programming language to replace C++ with one that can handle today's heterogeneous, multicore hardware better while also being more secure. According to Mozilla Research's FAQ on Rust and Servo -- on which it plans to build a new ARM-based Android Web browsing engine like the heavily used WebKit or Mozilla's own Gecko -- the new language will stop "entire classes of memory management errors" from causing crashes and security vulnerabilities.
The other major hallmark of Rust is that it has relatively easy-to-use programming language primitives, the simplest level of programming language expressions available to programmers. This is expected to make it much easier for software developers to use modern hardware's multicore central processing units.
That all may sound like a holy grail of programming, but why does Mozilla care? What this has to do with Web browsers, Mozilla's primary concern, is that C++ is the language all modern browsers are written in, and it's just not good enough, Mozilla Chief Technical Officer Brendan Eich told CNET yesterday.
"C++ is unsafe by design," he said. "It gets you down to the metal," a term that means that the code runs very fast because it can be read directly by the hardware, "but it is unsafe."
He noted that every year browsers fall victim to hacking in the annual Pwn2Own contest at the CanSecWest conference. "There's no free memory reads" in Rust, he said, but there are in C++. Those problems "lead to a lot of browser vulnerabilities" and would be solved by Rust, which is a self-compiling language.
Besides security, the other major issue that Eich hopes Rust will solve is the issue of concurrency in processing cores. Currently, adding more processing cores to a device, such as a smartphone, does not actually make it faster because of problems in power management. "As you add more cores, because of the power wall problem, you actually have to reduce the CPU clock frequency," Eich said.
Greg Sullivan, a senior product manager at Microsoft, agreed. "Multicore won't help you in a world where the apps aren't threaded," he told CNET.
Eich said that Samsung has committed around 20 people to the Rust project. Samsung, for its part, is known for having its fingers in as many different pies as possible.
While Samsung didn't address directly whether it is contributing to Rust and Servo in the hopes of solving the issue of multicore threading, a company spokesperson said today: "This collaboration will bring an opportunity to open a new era of future Web experiences."
From where Mozilla stands, this is a smart move for Samsung. "Samsung believes in this as a good investment in case all the hardware predictions are true," Eich said.
Hardware has reached an interesting level of development in which the twin forces of Moore's Law and Bell's Law have run up against the wall of programming language limitations. Rust may solve the problems of C++, but seeing as how Eich believes that a usable browser engine built on Rust is years away, the future may take quite some time to get here.
Updated at 9:50 a.m. PT with comment from Samsung.
Correction at 11:00 a.m. PT: This story originally included an inaccurate definition of the programming term "metal".