Original URL: http://www.theregister.co.uk/2013/11/12/chrome_pnacl_stable_release/

Mainstream Chrome spits ARM, Intel apps on the fly from cross-platform code

Architecture, smarchitecture ... Get .exe speed on the web

By Neil McAllister

Posted in Developer, 12th November 2013 21:27 GMT

Google has shipped the stable release of version 31 of its Chrome web browser, and with it the first generally available version of its Portable Native Client (PNaCl) compiled-code technology for the web.

First unveiled at the Google I/O developer conference earlier this year, PNaCl is an updated version of the Native Client (NaCl) technology that has been present in Chrome since 2011.

NaCl allows developers to write modules for sandboxed web apps in C/C++, rather than JavaScript. These compiled binary modules can then be downloaded by a user's web browser and executed on the local CPU, taking advantage of the full computational power of the user's PC.

Because NaCl modules are essentially binary executables, however, developers must build separate versions of them for each processor architecture, including 32-bit and 64-bit Intel chips, ARM, and so on.

PNaCl (pronounced "pinnacle") eliminates this problem by compiling the modules into an intermediary format instead of executable code, then having the browser complete the final compilation step for whichever architecture it's running on.

The tech is now available in the stable releases of Chrome for Windows, OS X, Linux, and Chrome Frame.

Google wouldn't mind seeing it show up in other browsers, too – it's open source – but don't hold your breath. The Mozilla Foundation, for one, has pooh-poohed the idea of browsers running native code since Google first floated it in 2010. Microsoft, on the other hand, has offered ActiveX as its own take on native code for the web for years now and isn't likely to change gears.

Developers who write PNaCl modules can still have their code run on non-Chrome browsers, however, by compiling them to JavaScript using the Emscripten compiler and Google's pepper.js library.

You can see some PNaCl code in action – both executing natively and via the browser's JavaScript interpreter – by visiting Google's examples gallery (though to run the native versions you'll need to be sure your copy of Chrome is up to date). ®