Google's Native Client technology is ready for prime time

Nov 13, 2013 09:42 GMT  ·  By

Google has pushed Chrome 31 to the stable channel and, with it, PNaCl is now considered stable technology. Chrome 31 comes with built-in support for PNaCl enabled by default, making it possible for developers to deploy Native Client apps from the web and have just one file for all architectures.

Native Client makes it possible to run apps written in C/C++ inside Google Chrome with almost the same speed as a natively compiled app would. To date, the technology was only available to Chrome Apps, even though it was designed with web deployment in mind.

What's more, developers had to compile their code for all the different architectures that Chrome ran on, i.e. x86, ARM, and so on.

PNaCl is the evolution of NaCl and has several advantages over it. Specifically, devs only have to compile once and they can host their apps on a site and load them just like any other resource.

To achieve this, Google changed the way NaCl works. For PNaCl apps, code is only compiled to an intermediate representation, similar to LLVM bytecode, which is then wrapped as PNaCl executable. The browser then converts this code to the architecture it's running on, after it's loaded from the web.

With PNaCl, Chrome can handle heavy duty apps that wouldn't achieve the performance they need by using JavaScript.

"By helping developers directly leverage the power of the underlying CPU and GPU, NaCl enables web applications from photo editing and audio mixing, to 3D gaming and CAD modeling," Google explains.

"PNaCl unlocks the power of native performance for applications like Bullet physics simulators and Lua interpreters," it adds.

With the inclusion in Chrome 31, PNaCl is considered mature and ready for general use. Whether or not it will actually be all that popular remains to be seen. But it does open up an opportunity for developers who may not have been able to get their apps on the web otherwise. PNaCl is Chrome-only, of course, but there is a JavaScript converter, so PNaCl code is compatible with other browsers, in theory.