Google shows interest in ASM.js, Mozilla's plan for fast Web apps
Securing support from other browser makers is crucial to the success of a programming technology. Without that support, programmers can only target a single browser, which undermines the advantages of universality that the Web can offer.
Google didn't respond to a request for comment about its position on the matter.
Browser makers often ally to bring a new technology to market and to help coax Web programmers to use it. What's particularly notable about Google's support is that the company already has other competing projects well under way.
The C language is often used for programs like streaming-media codecs and video game physics engines, but today's browsers can't use modules written in C unless it's packaged as a browser plug-in. And increasingly, plug-ins are frowned upon because they're inconvenient to install and maintain, a security risk, and sometimes a problem for processor and battery usage.
Thus, Web developers are striking out in new directions such as ASM.js to find better ways to let browsers handle C software.
For Google, it's Native Client (NaCl) and its sibling Portable Native Client (PNaCl). This software runs a restricted set of C instructions, compiled from the original source code using special tools, and runs it in a special protected sandboxed area. C developers must adapt their software for Native Client's restrictions, but Google argues that in many cases the change is very easy, and indeed some games on the Chrome Web Store use Native Client.
Neither NaCl nor Dart, though, has much support outside Google. No other browser makers have shown any enthusiasm for either technology, and in some cases they've been downright hostile, as in the case of Mozilla opposing NaCl and Microsoft bad-mouthing Dart. Adding new programming foundations to the Web is a very big deal, since significant developer adoption means that all browsers forever must support that foundation alongside others. And as a technical matter, supporting multiple programming foundations running simultaneously is fraught with technical complexities.
Google hopes that with NaCl, it can get browser-executed software downloaded over the Net to run with performance that's within a few percentage points of native code. Mozilla's Emscripten and ASM.js projects promise nothing close to that -- but also don't require a profound rewrite of the Web programming stack.
"It's early to say, but our preliminary benchmarks of C programs compiled to ASM.js are usually within a factor of 2 slowdown over native compilation with clang," the ASM.js FAQ says.