Google Releases Native Client SDK (Dev Preview)
Join the DZone community and get the full member experience.Join For Free
See Gartner’s latest research on the application performance monitoring landscape and how APM suites are becoming more and more critical to the business, brought to you in partnership with AppDynamics.
The research version of Native Client was made available about one year ago. It consisted of a source tree snapshot that developers could download and play with, but the download was pretty bulky. The Native Client SDK is much more lightweight, giving you access to powerful APIs and allowing you to write C/C++ that works seamlessly in Chromium. It includes only the essential components for getting an app up and running. These components include a modified GCC compiler to generate x86-32 or x86-64 binaries from C/C++, ports of open source projects such as zlib, Lua, and libjpeg, and some samples for developing with the NPAPI Pepper Extensions.
Another important part of the Native Client project is the Portable Native Client (PNaCl). PNaCl splits the NaCl software execution into two parts to make it work on more processors. It allows the browser to translate the portable representation into native binary for any type of processor without accessing the source code of the program. The first step translates the developer's code into LLVM bitcode; a portable intermediate state. The second part of the process involves the specific NaCl modules for each specific processor architecture, which is detected by PNaCl. These modules then translate the bitcode into machine code for the correct architecture. This is also the stage in which security checks are run. Google is still trying to determine how much overhead is added by these translations and learning how to reduce it.
To start building your own NaCl applications, download a recent build of Chromium and the NaCl SDK. You'll need to start Chromium with the --enable-nacl command-line flag to test apps and samples. The SDK won't work with the Native Client browser plugins yet because NPAPI Pepper extensions are currently only available in Chromium. Google will be updating the SDK frequently over the next few months, so stay tuned.
Check out this research paper on NaCl performance.