BT

PNaCl: Google Adds More Native Support to Chrome via LLVM

by Abel Avram on May 18, 2013 |

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.

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

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT