BT

New Early adopter or innovator? InfoQ has been working on some new features for you. Learn more

PNaCl: Google Adds More Native Support to Chrome via LLVM

| by Abel Avram Follow 4 Followers on May 18, 2013. Estimated reading time: 1 minute |

Google broadens support for native applications in Chrome by enabling it to run LLVM bitcode.

Google continues pushing support for running native applications in Chrome announcing the anticipated PNaCl, or Portable NaCl - read as ‘pinnacle’, during Google I/O 2013. PNaCl introduces a twist in the toolchain: instead of compiling C/C++ applications for each of the hardware platforms targeted, developers now need to generate a single LLVM bitcode which is them loaded by any Chrome client and translated to native code, validated and executed locally.

Currently, PNaCl is supported by Chrome 29 for 32-bit x86, 64-bit x86, and ARM architectures, and clients will be able to run native modules on any web page – no need for packaging them in apps for Chrome Web Store –, when it is fully released. Also, PNaCl modules will be able to run on future architectures without recompilation. What’s more interesting is that while currently only C/C++ is supported, PNaCl modules can be theoretically written in any languages that can be compiled to LLVM bitcode, including ActionScript, Ada, D, Fortran, Haskell, Java bytecode, Objective-C, Python, Ruby, Rust, Scala and C#, broadening the spectrum of legacy and newer native applications that can be run in Chrome with minimal or no adaptation.

PNaCl was proposed internally by a team of 4 Google engineers back in 2010 (PDF), the authors envisioning a solution that would:

  • Provide an ISA-neutral format for compiled NaCl modules supporting a wide variety of target platforms without recompilation from source.
  • Make it easy for NaCl developers to build, test and deploy portable executable modules.
  • Support the x86-32, x86-64 and ARM instruction sets initially, but make it straightforward to support other popular general-purpose CPUs in future.
  • Preserve the security and performance properties of Native Client.

PNaCl still uses the original NaCl sandbox mechanism which is meant to enforce security when running translated bitcode as shown in the following graphic:

image

The PNaCl development toolchain works on Windows, Mac, and Linux, an SDK being available on project’s website.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT