Developer(s) | Google, others |
---|---|
Initial release | 16 September 2011[1] |
Stable release | SDK: Pepper 45 / 10 July 2015
Clients: Same as Google Chrome |
Repository | |
Written in | C, C++ |
Operating system | Windows, Linux, macOS, ChromeOS |
Platform | x86, ARM, MIPS |
Successor | WebAssembly |
Type | Sandbox in web browsers for native code |
License | New BSD |
Website | developer |
Google Native Client (NaCl) is a discontinued sandboxing technology for running either a subset of Intel x86, ARM, or MIPS native code, or a portable executable, in a sandbox. It allows safely running native code from a web browser, independent of the user operating system, allowing web apps to run at near-native speeds, which aligns with Google's plans for ChromeOS. It may also be used for securing browser plugins, and parts of other applications or full applications[2] such as ZeroVM.[3]
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 were also plans to make NaCl available on handheld devices.[4][5]
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.[6] The general concept of NaCl (running native code in web browser) has been implemented before in ActiveX, which, while still in use, has full access to the system (disk, memory, user-interface, registry, etc.). Native Client avoids this issue by using sandboxing.
An alternative by Mozilla was asm.js, which also allows applications written in C or C++ to be compiled to run in the browser 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.
On 12 October 2016, a comment on the Chromium issue tracker indicated that Google's Pepper and Native Client teams had been destaffed.[7] On 30 May 2017, Google announced deprecation of PNaCl in favor of WebAssembly.[8] Although initially Google planned to remove PNaCl in first quarter of 2018,[8] and later in the second quarter of 2019,[9] it has been removed in June 2022 (together with Chrome Apps).[10][11]