Google defends native code Chrome play
'Don't ditch The Good for The Perfect'
Google has defended its decision to run native code inside its Chrome browser, while calling its Native Client plug-in a "very important part" of the company's Chrome OS strategy.
In unveiling its Cr-48 beta Chrome OS machine on Tuesday in San Francisco, Google did not mention Native Client. But when we asked what role the plug-in would play in the company's all-web-all-the-time OS, Google engineering director Linus Upson made it quite clear that Native Client — aka NaCL — isn't just a side experiment.
Asked if a final version of Native Client would ship with the first Chrome OS netbooks, due in "mid-2011," Upson was non-committal. But he did say that Native Client was "pretty far along." And he said that the plug-in would be turned on in the stable version of the company's Chrome browser — the basis for Chrome OS — "early next year." And he pointed out that after you purchase a Chrome OS machine, Google will continually update the operating system with new tools via the net.
He said that eventually, "you'll be able to take existing seasoned [native code] and run it securely across all platforms, including Chrome OS." But by all platforms, he means all Chrome platforms. Native Client has not been adopted by any other major browser vendors, and some have questioned whether the plug-in undermines the movement towards applications based entirely on web standards.
Mozilla has said quite plainly that its browser will not run native code, and Opera is similarly down on the idea. "That's not something we're pursuing. We really believe in HTML, and this is where we want to focus," Mozilla vice president of products Jay Sullivan told The Reg this summer at a Silicon Valley conference dedicated to net infrastructure. "
But speaking with us on Tuesday, Google's Upson strongly defended the concept. The first thing he said was that Native Client is open source. "We don't want to do anything proprietary," he said. But then he moved on to meatier matters. Upson said the in his conversions with the likes of Opera and Mozila, those browser makers have been pleased with the way Native Client handles security, and he believes they will start using it to secure their own code.
Native Client is designed to ensure that each application module meets a set of structural criteria that allow it to dissemble instructions, and that it can't contain certain instruction sequences. "This framework aims to enable our runtime to detect and prevent potentially dangerous code from running and spreading," Google said when announcing Native Client.
Upson said that Google is using Native Client to help build Chrome itself. "We're starting to use Native Client internally in Chrome to help secure more and more of the browser. I wouldn't be surprised if more and more browser vendors do the same," he said. "What Native Client can do is to make it so that if you write a bug in your code — we all write bugs — it doesn't become a security vulnerability. It's an additional layer of security."
But what about using Native Client to run web applications? But about web standards? "When it comes to running programs over the web in Native Client, we're very sensitive to maintaining the qualities of the web that have made it so successful," Upson said. "One of those things is that you can write applications that can run on any computer. One of the reasons we haven't widely deployed Native Client so far is we're working on something called Portable Native Client, so you're not tied to any one particular instruction set, so people can build whole new CPUs, whole new chip architectures, and [applications] won't get tied to those."
Portable Native Client — aka PNaCl, pronounced "pinnacle" — is a means of distributing portable versions of Native Code executables across all processors. The idea is to compile C, C++, and other languages into the Low Level Virtual Machine (LLVM) bitcode format, which allows for client-side translation into the client's native instruction set.
Opera chief standards officer Charles McCathieNevile argues that Native Client isn't a viable long-term technology because it runs counter to the web mission. One of the core notion of the web, MCathieNevile said, is to offer developers a relatively small set of tools they can use to build applications that run across as many machines as possible. If you native code into the mix, you lose the simplicity that comes from using a contained set of standards.
Upson said he's sympathetic to such concerns. But he indicated that Google's main aim is to ensure that the web isn't dominated by proprietary technologies. "We don't want proprietary application platforms to take over [and this could happen if we] make the perfect the enemy of the good," he said. Presumably, "the perfect" is a world where applications are written in nothing but web standards, and "the good" is Native Client.
But unless the other browser-makers embrace the thing, you're only serving a portion of the web. ®
Sponsored: Today’s most dangerous security threats