Developer(s) | Google, others |
---|---|
Initial release | September 16, 2011 |
Stable release |
SDK: Pepper 45 / 10 July 2015
Clients: Same as Google Chrome |
Repository | chromium |
Development status | Production (NaCl, PNaCl) |
Written in | C, C++ |
Operating system | Windows, Linux, macOS, Chrome OS |
Platform | x86, ARM, MIPS |
Type | Sandbox in web browsers for native code |
License | New BSD |
Website | developer |
Clients: Same as Google Chrome
Google Native Client (NaCl) is a sandboxing technology for running a subset of Intel x86, ARM, or MIPS native code in a sandbox. It allows safely running native code from a web browser, independent of the user operating system, allowing web-based applications to run at near-native speeds, which aligns with Google's plans for Chrome OS. It may also be used for securing browser plugins, and parts of other applications or full applications such as ZeroVM.
To demonstrate the readiness of the technology, on 9 December 2011, Google announced the availability of several new Chrome-only versions of games known for their rich and processor-intensive graphics, including Bastion (no longer supported on the Chrome Web Store). NaCl runs hardware-accelerated 3D graphics (via OpenGL ES 2.0), sandboxed local file storage, dynamic loading, full screen mode, and mouse capture. There are also plans to make NaCl available on handheld devices.
Portable Native Client (PNaCl) is an architecture-independent version. PNaCl apps are compiled ahead-of-time. PNaCl is recommended over NaCl for most use cases. The general concept of NaCl (running native code in web browser) has been implemented before in ActiveX, which, while still in use, has a legacy of DLL Hell and security problems. Native Client avoids these issues by using sandboxing.
An alternative of sorts to NaCl is asm.js, which also allows applications written in C or C++ to be compiled to run in the browser (at more than half the native speed), and also supports ahead-of-time compilation, but is a subset of JavaScript and hence backwards-compatible with browsers that do not support it directly. Another alternative (while it may initially be powered by PNaCl) is WebAssembly.