Feeds

Google heats up native code for Chrome OS

Salt, Pepper, and a whole lotta plug-in

Providing a secure and efficient Helpdesk

Google has released a preliminary software development kit for Native Client, its native-code browser plug-in.

The company unveiled its Native Client SDK "developer preview" with a blog post on Wednesday, calling it "an important first step in making Native Client more accessible as a tool for developing real web applications." Google released a research version of Native Client a year ago - including a snapshot of its source tree - and this allowed for application development. But until now there was no formal SDK.

"The [research] download was big and cumbersome to use," reads the post from senior software engineer David Springer. "The Native Client SDK preview, in contrast, includes just the basics you need to get started writing an app in minutes."

Native Client - NaCl for short - is now bundled with Google's Chrome browser, but at this point the SDK only works with Chromium, the open source incarnation of Chrome. The SDK relies on certain extensions to NPAPI Pepper - a new browser plug-in model - and these are only available with Chromium.

NPAPI Pepper, an update to the Netscape Plug-in Application Programming Interface (NPAPI), was originally developed by Google, and the company says Mozilla is supporting the effort as well. But at this point, it's not available with Firefox or any other non-Google browser.

To use the Native Client SDK, you'll need a recent Chromium build, and you'll need to start it with a Native Client command line flag (--enable-nacl). You can grab the SDK here.

Native Client is a means of running native code inside the browser, letting you beef up a web app with existing libraries written in languages such as C and C++. As Google Native Client project manager Henry Bridge explains in a video that accompanies Springer's blog post, web apps written for Native Client include HTML, CSS, and JavaScript as well as native code. The HTML, CSS, and JavaScript bits are deployed as text files, and the native code bit require a compiler that produces Native Client binaries.

NaCl

NaCl

The SDK includes a compiler based on GCC (GNU Compiler Collection) for creating x86-32 or x86-64 binaries from C or C++ source code, and you'll find ports of popular open source projects like zlib, Lua, and libjpeg.

Google is obsessed with moving all applications into what it insists on calling the cloud, and Native Client is part of the company's ongoing efforts to put online apps on a par with desktop applications from the likes of Microsoft, its bête noire.

"Imagine you want to create a video editing application for the web," Bridge says. "When it comes time to write the code to modify the video data, what's the right approach? You could implement the video editing on the server but this approach would waste bandwidth and feel slow. On the other hand, you could try to implement video editing code that would run on the client in JavaScript but this would be difficult to implement and would also be slow.

"Native Client gives you the best of both worlds: download the data once to the client and do the editing there."

Google has said that Native Client will be an "important part" of its Chrome OS, the browser-based "operating system" set to debut on x86 and ARM netbooks at the end of the year. The original research version of native Client ran on x86-32, and recently, Google introduced versions that runs on x86-64 and ARM. The company says Native Client executables run at about 97 per cent of the speed of unmodified native code.

"These results indicate that a browser running on virtually any modern computer or cell phone could run a fast, performance-sensitive Native Client application," reads a blog post announcing the ARM and x86-64 versions. The new SDK does not yet work on ARM.

Chrome OS is essentially Google's Chrome browser running atop a Goobuntu flavor of Linux. Native Client runs not only on Linux but also on Windows and Mac.

In addition, Google is developing a means of distributing portable versions of Native Code executables across all processors. The Portable Native Client project - aka PNaCl, pronounced 'pinnacle' - uses the Low Level Virtual Machine (LLVM) bitcode format. The idea is to compile C, C++, and other languages into LLVM bitcode that allows for client-side translation into the client's native instruction set.

Google likes to say that it believes in open web standards. But Native Client is yet another way the company is pushing technology that's outside the standard web stack. Google says it has solved the security problems that plague other plug-ins that have attempted to beef up the performance of web applications, but Native Client is still a plug-in. And at the moment, it only works with Chrome.

Next week, at Google's annual developer conference in San Francisco, Native Client engineers David Springer and Ian Lewis will detail the technology to developers during a talk entitled "Beyond JavaScript." And judging from Google's conference schedule, you'd have to say that the company will make some sort of announcement around Chrome or Chrome OS - two Chrome sessions are listed as "TBA."

This week, Verizon CEO Lowell McAdam told The Wall Street Journal that the US wireless carrier is working with Google on an iPad-challenging tablet PC, and the rumor is that it will be unveiled at next week's conference. McAdam did not say which Google OS the tablet would use, but the assumption is that it will run Android. Google has said in the past that Chrome OS will debut solely on netbooks.

We do get the feeling, however, that Google is moving at least some of its online applications to Native Client as it prepares for the launch of Chrome OS. That OS will not run local applications. At all. ®

Internet Security Threat Report 2014

More from The Register

next story
UNIX greybeards threaten Debian fork over systemd plan
'Veteran Unix Admins' fear desktop emphasis is betraying open source
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Redmond top man Satya Nadella: 'Microsoft LOVES Linux'
Open-source 'love' fairly runneth over at cloud event
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.