/>
X

Google reinvents the applet with Portable Native Client

Google looks to take C and C++ across the web with its Portable Native Client.
chrisduckett-mk3.png
Written by Chris Duckett on

The "write once, run anywhere" promise of Java from the 90s is back in a new guise, as Google today announced Portable Native Client (PNaCl) with the promise to allow developers to "compile their code once to run on any hardware platform and embed their PNaCl application in any website".

"Under the hood, PNaCl works by compiling native C and C++ code to an intermediate representation, rather than architecture-specific representations as in Native Client," wrote Google engineer, David Sehr, in a blog post. "The LLVM-style bytecode is wrapped into a portable executable, which can be hosted on a web server like any other website asset.

"When the site is accessed, Chrome fetches and translates the portable executable into an architecture-specific machine code optimized directly for the underlying device."

Google touts that developers will not need to recompile applications to run across different chip architectures.

It all sounds awfully similar to the applet approach that Java took in the bad early days of the internet.

The saving grace of PNaCl is that it does not involve the installation of a runtime that allows multiple attack vectors on the client machine, ala Java, and instead is run either through Chrome itself, or with the help of Emscripten and pepper.js for other browsers.

Google recently announced that by year's end, it would be discontinuing Chrome's support for all Netscape Plugin API plugins in favour of Native Client, Chrome's Pepper Plugin API, Packaged App, or Legacy Browser Support interfaces.

Related

Why you should really stop charging your phone overnight
iphone-charging.jpg

Why you should really stop charging your phone overnight

iPhone
Samsung phone deal: Get the Galaxy S22 Ultra for $299
1296x729-29

Samsung phone deal: Get the Galaxy S22 Ultra for $299

Smartphones
The best iPhone deals available right now: July 2022
iphone 12 vs iphone 11 cnet.jpg

The best iPhone deals available right now: July 2022

iPhone