Announced more than a year ago, Google Native Client (NaCl) made its debut in Chrome Beta Channel yesterday after its SDK reached stability with version 0.5 in late July, and it will be soon released to production with Chrome 14. Applications compiled with SDK 0.5 have a stable ABI (Application Binary Interface) making them compatible with future versions of Chrome. Applications built with earlier SDKs need to be rebuilt because they are not compatible with the latest ABI.
Native Client is an open source, open format project that wants to address the browser performance problem that many complained in the past by saying that while web applications are great due to their portability and easiness of use, they are not on par with native applications because in some cases they are too slow. NaCl solves a part of this problem because native code written in C or C++ can now run inside a protected sandbox environment, being ale to access the web page, be it HTML5 or JavaScript, though the Pepper API. NaCl and Pepper are the salt-and-pepper of web applications, adding what was missing to a more complete web experience. Google advertises a performance drop of less than 5% for running NaCl code inside the browser compared to out of the browser.
Developers can write NaCl modules for 32 and 64-bit Windows and Linux platforms and 32-bit Mac using Eclipse for C/C++ or Xcode, and Google promises to add NaCl support for Visual Studio in the future. Since it runs on a LLVM (Low Level Virtual Machine), other languages can be supported in the future, and there are a number of compilers under development including Objective-C and FORTRAN. Currently, one must build NaCl modules for each targeted platform, but that will be solved when the Portable Native Client (PDF) is added, and modules will be compiled to a single neutral instruction set that will run on all platforms.
NaCl initially used Netscape Plugin Application Programming Interface (NPAPI) but switched later to Pepper because NPAPI does not have “robust support” for “event handling, out-of-process plugins, and asynchronous interfaces.” Also, NaCl was intended initially to run on multiple browsers, but it seems that only Chrome will support it because others don’t use Pepper.
A number of examples are available online, but they work only with Chrome 14.