# Google Native Client

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Google_Native_Client
> Markdown URL: https://mediated.wiki/source/Google_Native_Client.md
> Source: https://en.wikipedia.org/wiki/Google_Native_Client
> Source revision: 1340374244
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Web technology developed by Google}}
{{Redirect|Google NaCl|Networking and Cryptography library|NaCl (software)}}
{{Use dmy dates|date=January 2021}}
{{Infobox software
| name = Google Native Client
| developer = [Google](/source/Google), others
| programming language = [C](/source/C_(programming_language)), [C++](/source/C%2B%2B)
| released = {{start date and age|df=yes|2011|9|16}}<ref name="nacl_prod">{{cite web |url=https://www.theregister.co.uk/2011/09/16/native_client_debuts_in_chrome/|title=Google's Native Client goes live in Chrome|work=[The Register](/source/The_Register)|date=2011-09-16|access-date=2016-03-12}}</ref>
| latest release version = '''SDK:''' [http://developer.chrome.com/native-client/sdk/release-notes Pepper 45] / {{start date and age|df=yes|2015|07|10}}
<!--                    -->'''Clients:''' Same as [Google Chrome](/source/Google_Chrome)
| operating system = [Windows](/source/Windows), [Linux](/source/Linux), [macOS](/source/macOS), [ChromeOS](/source/ChromeOS)
| platform = [x86](/source/x86), [ARM](/source/ARM_architecture), [MIPS](/source/MIPS_architecture)
| replaced_by = [WebAssembly](/source/WebAssembly)
| genre = [Sandbox](/source/Sandbox_(computer_security)) in web browsers for native code
| license = [New BSD](/source/BSD_licenses)
| website = {{official url}}
}}
'''Google Native Client''' ('''NaCl''') is a discontinued [sandboxing](/source/sandbox_(computer_security)) technology for running either a subset of Intel [x86](/source/x86), [ARM](/source/ARM_architecture), or [MIPS](/source/MIPS_architecture) native code, or a portable executable, in a sandbox. [Google Chrome](/source/Google_Chrome) and other [Chromium](/source/Chromium_(web_browser))-based [web browsers](/source/web_browser) incorporated NaCl to safely run [native code](/source/native_code) within [web app](/source/web_app)s and [browser extensions](/source/Browser_extension), largely independent of the user [operating system](/source/operating_system) and at near-native speeds. This capability was imperative for Google's plans for [ChromeOS](/source/ChromeOS) as a general-purpose computing platform. NaCl was also used for securing browser [plugins](/source/plug-in_(computing)), like [Adobe Flash Player](/source/Adobe_Flash_Player), and parts of other applications or full applications<ref name="Register">{{cite web |url=https://www.theregister.co.uk/2011/09/12/google_native_client_from_all_sides/ |title= Google Native Client: The web of the future – or the past?|first= Cade|last= Metz|date=12 September 2011|publisher=The Register|access-date=17 September 2011}}</ref> such as [ZeroVM](/source/ZeroVM).<ref name="ZeroVM">{{cite web |url=http://zerovm.org/architecture.htm |title=ZeroVM Architecture |access-date=16 March 2014 |archive-url=https://web.archive.org/web/20140208033325/http://zerovm.org/architecture.htm |archive-date=8 February 2014 |url-status=dead}}</ref>

The general concept of NaCl (running native code in the web browser) has been implemented before in [ActiveX](/source/ActiveX), but NaCl runs content in a sandbox while ActiveX application has full access to the system (disk, memory, user-interface, registry, etc.). Mozilla proposed [asm.js](/source/asm.js) as an alternative to both ActiveX and NaCl. asm.js also allows applications written in [C](/source/C_(programming_language)) or [C++](/source/C%2B%2B) 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.

In 2016, Google de-prioritized feature development for Pepper and Native Client. On 30 May 2017, Google announced deprecation of PNaCl in favor of [WebAssembly](/source/WebAssembly).<ref name=":0">{{Cite news|url=https://blog.chromium.org/2017/05/goodbye-pnacl-hello-webassembly.html|title=Goodbye PNaCl, Hello WebAssembly!|work=Chromium Blog|access-date=2017-05-31|language=en-US}}</ref> Over the following years, Google Chrome slowly deprecated and removed NaCl on different platforms. ChromeOS version 137 released in 2025 became the last platform and version to support Native Client.

== Overview ==

Native Client was an [open-source](/source/open-source_software) project developed by [Google](/source/Google).<ref>{{cite web |url=https://code.google.com/p/nativeclient/ |title=Google Native Client on Google Code |access-date=25 April 2012}}</ref> Games such as ''[Quake](/source/Quake_(video_game))'',<ref>{{cite web |url=https://github.com/davemichael/NaCl-Quake|title=GitHub - davemichael/NaCl-Quake: Quake for Native Client (based on the SDL Quake port)|author=davemichael|work=GitHub|date=3 October 2020}}</ref> ''[XaoS](/source/XaoS)'', ''[Battle for Wesnoth](/source/Battle_for_Wesnoth)'',<ref>{{cite web |url=https://chrome.google.com/webstore/detail/the-battle-for-wesnoth/pobnonecghmlpppkkjpdiiblmakhhldb|title=The Battle for Wesnoth}}</ref> ''[Doom](/source/Doom_(1993_video_game))'',<ref>{{cite web|url=http://doom.pdox.net/|title=Index of /|access-date=26 November 2013|archive-date=23 April 2025|archive-url=https://web.archive.org/web/20250423220655/https://doom.pdox.net/|url-status=dead}}</ref> ''[Lara Croft and the Guardian of Light](/source/Lara_Croft_and_the_Guardian_of_Light)'',<ref>{{Cite web |url=https://chrome.google.com/webstore/detail/lara-croft-and-the-guardi/dcfdbmpeeihbpddkneaploeinlbaaodn |title=Chrome Web Store - Lara Croft and the Guardian of Light |access-date=26 November 2013 |archive-url=https://web.archive.org/web/20131208080414/https://chrome.google.com/webstore/detail/lara-croft-and-the-guardi/dcfdbmpeeihbpddkneaploeinlbaaodn |archive-date=8 December 2013 |url-status=dead}}</ref> ''[From Dust](/source/From_Dust)'',<ref>{{cite web|url=https://chrome.google.com/webstore/detail/from-dust/anelkojiepicmcldgnmkplocifmegpfj|title=From Dust|access-date=24 February 2016|archive-url=https://web.archive.org/web/20160312080315/https://chrome.google.com/webstore/detail/from-dust/anelkojiepicmcldgnmkplocifmegpfj|archive-date=12 March 2016|url-status=dead}}</ref> and [MAME](/source/MAME), as well as the sound processing system [Csound](/source/Csound), have been ported to Native Client. Native Client has been available in the [Google Chrome](/source/Google_Chrome) web browser since version 14, and has been enabled by default since version 31, when the Portable Native Client (PNaCl, pronounced: pinnacle) was released.<ref name="announcement">{{cite web |last=Chen |first=Brad |url=http://googlecode.blogspot.com/2008/12/native-client-technology-for-running.html |title=Native Client: A Technology for Running Native Code on the Web |publisher=Google-code-updates.blogspot.com |date=8 December 2008 |access-date=25 April 2012}}</ref><ref>{{cite web |url=https://blog.chromium.org/2011/08/native-client-brings-sandboxed-native.html |title=The Chromium Blog: Native Client Brings Sandboxed Native Code to Chrome Web Store Apps |publisher=Blog.chromium.org |date=18 August 2011 |access-date=25 April 2012}}</ref><ref>{{cite web |url=https://blog.chromium.org/2013/11/portable-native-client-pinnacle-of.html |title=Google Code Blog: Portable Native Client: The "pinnacle" of speed, security, and portability |publisher=blog.chromium.org |date=12 November 2013 |access-date=16 March 2014}}</ref> Native Client has also been used to safely run downloaded code in software other than web browsers, like in the Dæmon game engine.<ref name="naclInGameEngine"/>

An [ARM](/source/ARM_architecture) implementation was released in March 2010.<ref>{{cite web |url=http://www.h-online.com/open/news/item/Google-s-Native-Client-goes-ARM-and-beyond-957478.html|title=Google's Native Client goes ARM and beyond|publisher=The H|date=18 March 2010|access-date=19 May 2010}}</ref> [x86-64](/source/x86-64), [IA-32](/source/IA-32), and [MIPS](/source/MIPS_architecture) were also supported.

To run an application portably under PNaCl, it must be compiled to an architecture-agnostic and stable subset of the [LLVM](/source/LLVM) [intermediate representation](/source/intermediate_representation) [bytecode](/source/bytecode).<ref>{{cite web|url=http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |title=PNaCl: Portable Native Client Executables|access-date=25 April 2012 |url-status=dead |archive-url=https://web.archive.org/web/20120502135033/http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |archive-date=2 May 2012}}</ref> The executables are called PNaCl executables (pexes). The PNaCl Toolchain makes .pexe files; NaCl Toolchain .nexe files. The [magic number](/source/file_format) of .nexe files is 0x7F 'E' 'L' 'F', which is [ELF](/source/Executable_and_Linkable_Format). In Chrome, they are translated to architecture-specific executables so that they can be run.

NaCl uses software [fault detection and isolation](/source/fault_detection_and_isolation) for sandboxing on x86-64 and ARM.<ref>{{cite web |url=http://research.google.com/pubs/pub35649.html|title=Adapting Software Fault Isolation to Contemporary CPU Architectures|first1=David |last1=Sehr |first2=Robert |last2=Muth |first3=Cliff L. |last3=Biffle |first4=Victor |last4=Khimenko |first5=Egor |last5=Pasko |first6=Bennet |last6=Yee |first7=Karl |last7=Schimpf |first8=Brad |last8=Chen |year=2010|publisher= 19th USENIX Security Symposium|access-date=31 July 2011}}</ref> The x86-32 implementation of Native Client is notable for its novel sandboxing method, which makes use of the x86 architecture's rarely used [segmentation facility](/source/x86_memory_segmentation).<ref name="nacl_paper">{{cite web |url=http://research.google.com/pubs/pub34913.html|title=Native Client: A Sandbox for Portable, Untrusted x86 Native Code|access-date=31 July 2011|first1=Bennet |last1=Yee |first2=David |last2=Sehr |first3=Greg |last3=Dardyk |first4=Brad |last4=Chen |first5=Robert |last5=Muth |first6=Tavis |last6=Ormandy |first7=Shiki |last7=Okasaka |first8=Neha |last8=Narula |first9=Nicholas |last9=Fullagar |publisher= IEEE Symposium on Security and Privacy (Oakland'09)|year=2009}}</ref> Native Client sets up x86 segments to restrict the memory range that the sandboxed code can access. It uses a code verifier to prevent use of unsafe instructions such as those that perform system calls. To prevent the code from jumping to an unsafe instruction hidden in the middle of a safe instruction, Native Client requires that all indirect jumps be jumps to the start of 32-byte-aligned blocks, and instructions are not allowed to straddle these blocks.<ref name=nacl_paper/> Because of these constraints, C and C++ code must be recompiled to run under Native Client, which provides customized versions of the [GNU toolchain](/source/GNU_toolchain), specifically [GNU Compiler Collection](/source/GNU_Compiler_Collection) (GCC), [GNU Binutils](/source/GNU_Binutils), and [LLVM](/source/LLVM).

Native Client is licensed under a [BSD-style license](/source/BSD_licenses).

Native Client uses [Newlib](/source/Newlib) as its [C library](/source/C_standard_library), but a port of [GNU C Library](/source/GNU_C_Library) (GNU libc) is also available.<ref>{{cite web |url=http://developer.chrome.com/native-client/devguide/devcycle/building |title=Native Client: Building |publisher=developer.chrome.com |access-date=16 March 2014 |archive-date=17 March 2014 |archive-url=https://web.archive.org/web/20140317025455/https://developer.chrome.com/native-client/devguide/devcycle/building |url-status=dead }}</ref>

== History ==
On 8 December 2008, Google introduced Native Client to the public  shortly after the September introduction of Google Chrome.<ref name="intro_blog">{{cite web |url=http://google-code-updates.blogspot.com/2008/12/native-client-technology-for-running.html |archive-url=https://web.archive.org/web/20081209233903/http://google-code-updates.blogspot.com/2008/12/native-client-technology-for-running.html |title=Native Client: A Technology for Running Native Code on the Web |last=Chen |first=Brad |date=8 December 2008 |archive-date=9 December 2008}}</ref> NaCl became generally available to the web when it was released in a stable Chrome version in September 2011.<ref name="nacl_prod" />

On 9 December 2011, Google demonstrated the readiness of the technology by announcing availability of several new Chrome-only versions of [game](/source/videogame)s known for their rich and [processor](/source/Central_processing_unit)-intensive [graphics](/source/computer_graphics), including ''[Bastion](/source/Bastion_(video_game))'' (no longer supported on the [Chrome Web Store](/source/Chrome_Web_Store)). NaCl runs [hardware-accelerated](/source/hardware_acceleration_(computing)) 3D graphics (via [OpenGL ES](/source/OpenGL_ES) 2.0), sandboxed local file storage, [dynamic loading](/source/dynamic_loading), full screen mode, and [mouse](/source/Computer_mouse) capture. There were also plans to make NaCl available on handheld devices.<ref name="CNet">{{cite web |last=Rosenblatt |first=Seth |date=9 December 2011 |title=Native Client turns Chrome into high-end gaming platform |url=http://download.cnet.com/8301-2007_4-57340015-12/native-client-turns-chrome-into-high-end-gaming-platform/ |url-status=dead |archive-url=https://web.archive.org/web/20120828174434/http://download.cnet.com/8301-2007_4-57340015-12/native-client-turns-chrome-into-high-end-gaming-platform/ |archive-date=28 August 2012 |access-date=9 December 2011 |publisher=CNET}}</ref><ref>{{cite web |date=9 December 2011 |title=Google Code Blog: Games, apps and runtimes come to Native Client |url=http://googlecode.blogspot.com/2011/12/games-apps-and-runtimes-come-to-native.html |access-date=25 April 2012 |publisher=Googlecode.blogspot.com}}</ref>

In 2013 Google introduced the Portable Native Client (PNaCl), an architecture-independent [compiled ahead-of-time](/source/ahead-of-time_compilation) version of NaCl.<ref name="pnacl_intro_blog">{{cite web |url=https://blog.chromium.org/2013/11/portable-native-client-pinnacle-of.html |title=Portable Native Client: The "pinnacle" of speed, security, and portability |date=12 November 2013}}</ref> Portable Native Client (PNaCl) is an architecture-independent version. PNaCl apps are [compiled ahead-of-time](/source/ahead-of-time_compilation). PNaCl is recommended over NaCl for most use cases.<ref>{{cite web |title=NaCl and PNaCl |url=https://developer.chrome.com/native-client/nacl-and-pnacl#when-to-use-pnacl |access-date=15 November 2015 |archive-date=18 November 2020 |archive-url=https://web.archive.org/web/20201118034806/https://developer.chrome.com/native-client/nacl-and-pnacl#when-to-use-pnacl |url-status=dead }}</ref> The general concept of NaCl (running native code in web browser) has been implemented before in [ActiveX](/source/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](/source/asm.js), which also allows applications written in [C](/source/C_(programming_language)) or [C++](/source/C%2B%2B) 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.<ref name=":1">{{cite web |url=https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 |title=Bugs.chromium.org |date=12 October 2016 | access-date=12 October 2016}}</ref> On 30 May 2017, Google announced deprecation of PNaCl in favor of [WebAssembly](/source/WebAssembly).<ref name=":0" /> Although initially Google planned to remove PNaCl in first quarter of 2018,<ref name=":0" /> and later in the second quarter of 2019,<ref>{{Cite web |title=WebAssembly Migration Guide - Google Chrome |url=https://developer.chrome.com/native-client/migration |access-date=2018-12-20 |website=developer.chrome.com |archive-date=12 March 2019 |archive-url=https://web.archive.org/web/20190312123815/https://developer.chrome.com/native-client/migration |url-status=dead }}</ref> it has been removed in June 2022 (together with [Chrome Apps](/source/Google_Chrome_App)).<ref name=":2">{{cite web |date=10 August 2020 |title=Changes to the Chrome App Support Timeline |url=https://blog.chromium.org/2020/08/changes-to-chrome-app-support-timeline.html |website=Chromium Blog}}</ref><ref name=":3">{{Cite web |last=Li |first=Abner |date=10 August 2020 |title=Google delays deprecation of Chrome Apps on all platforms |url=https://9to5google.com/2020/08/10/chrome-apps-deprecation/ |access-date=2021-10-02 |website=[9to5Google](/source/9to5Google) |language=en-US}}</ref>

LLVM 22, released in February 2026, became the first version to loose support for building NaCl binaries.<ref>{{Cite web |title=LLVM 22 Eliminates The Final Support For Google Native Client "NaCl" |url=https://www.phoronix.com/news/LLVM-22-Removes-Native-Client |access-date=2026-02-25 |website=www.phoronix.com |language=en}}</ref>

== Pepper ==

{{See also|NPAPI#PPAPI}}
NaCl denotes [sodium chloride](/source/sodium_chloride), common table [salt](/source/salt); as a [pun](/source/pun), the name of [pepper](/source/black_pepper) was also used. Pepper API is a cross-platform, open-source API for creating Native Client modules.<ref>{{cite web|url=https://developer.chrome.com/native-client/overview|archive-url=https://web.archive.org/web/20140228181744/http://developer.chrome.com/native-client/overview|url-status=dead|archive-date=28 February 2014|title=Technical Overview}}</ref> Pepper Plugin API, or PPAPI<ref>{{cite web |url=https://developer.chrome.com/native-client/pepper_stable/index |title=Pepper Plugin API project at |access-date=25 April 2012 |archive-date=9 September 2016 |archive-url=https://web.archive.org/web/20160909014923/https://developer.chrome.com/native-client/pepper_stable/index |url-status=dead }}</ref><ref>{{cite web |url=https://src.chromium.org/viewvc/chrome/trunk/src/ppapi/ |title=Chrome Source: Index of /trunk/src/ppapi |publisher=Src.chromium.org |access-date=25 April 2012}}</ref> is a cross-platform API for Native Client-secured web browser plugins, first based on Netscape's [NPAPI](/source/NPAPI), then rewritten from scratch. It was used in Chromium and [Google Chrome](/source/Google_Chrome) to enable the PPAPI version of [Adobe Flash](/source/Adobe_Flash)<ref>{{cite web |url=https://blog.chromium.org/2012/08/the-road-to-safer-more-stable-and.html |title=The road to safer, more stable, and flashier Flash |date=8 August 2012 |access-date=10 August 2013}}</ref> and the built-in [PDF](/source/PDF) viewer.<ref>{{cite web |last=Metz |first=Cade |url=https://www.theregister.co.uk/2010/06/18/chrome_dev_builds_get_built_in_pdf_reader/ |title=Google hugs Adobe harder with Chrome-PDF merge |publisher=The Register |date=18 June 2010 |access-date=25 April 2012}}</ref>

=== PPAPI ===

On 12 August 2009, a page on Google Code introduced a new project, Pepper, and the associated Pepper Plugin API (PPAPI),<ref>{{cite web |url=https://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics#TOC-Pepper-Plugin-API-PPAPI- |title=Getting Started: Background and Basics – The Chromium Projects |publisher=Chromium.org |access-date=25 April 2012 |archive-date=21 December 2020 |archive-url=https://web.archive.org/web/20201221070247/http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics#TOC-Pepper-Plugin-API-PPAPI- |url-status=dead }}</ref> "a set of modifications to NPAPI to make plugins more portable and more secure".<ref>{{cite web |url=https://code.google.com/p/ppapi/wiki/Concepts |title=Pepper.wiki |date=24 February 2012 |access-date=25 April 2012}}</ref> This extension is designed specifically to ease implementing out-of-[process](/source/process_(computing)) plugin execution. Further, the goals of the project are to provide a framework for making plugins fully cross-platform. Topics considered include:
*Uniform semantics for NPAPI across browsers.
*Execution in a separate process from the renderer-browser.
*Standardize rendering using the browser's compositing process.
*Defining standardized events, and 2D rasterizing functions.
*Initial attempt to provide 3D graphics access.
*Plugin registry.

The Pepper API also supports [Gamepad](/source/Gamepad)s (version 19) and [WebSocket](/source/WebSocket)s (version 18).<ref>{{cite web|url=https://developer.chrome.com/native-client/sdk/release-notes|title=Release Notes|access-date=16 March 2014|archive-date=18 November 2020|archive-url=https://web.archive.org/web/20201118040822/https://developer.chrome.com/native-client/sdk/release-notes|url-status=dead}}</ref>

{{As of|2010|5|13}}, Google's open source browser, [Chromium](/source/Chromium_(web_browser)), was the only web browser to use the new browser plug-in model.<ref>{{cite web |last=Metz |first=Cade |url=https://www.theregister.co.uk/2010/05/13/google_native_client_sdk/ |title=Google heats up native code for Chrome OS |publisher=Theregister.co.uk |date=13 May 2010 |access-date=25 April 2012}}</ref> As of 2020, Pepper is supported by Chrome, Chromium and Blink layout engine-based browsers such as Opera and Microsoft Edge.

In August 2020, Google announced that support for PPAPI would be removed from Google Chrome and Chromium in June 2022.<ref>{{cite web |url=https://blog.chromium.org/2020/08/changes-to-chrome-app-support-timeline.html |title=Changes to the Chrome App Support Timeline |date=10 August 2020 |author=Anthony Laforge |website=Chromium Blog }}</ref>

==== PPAPI in Firefox ====

[Firefox](/source/Firefox) developers stated in 2014 that they would not support Pepper, as there were no full specification of the API beyond its implementation in Chrome, which itself was designed for use with [Blink layout engine](/source/Blink_layout_engine) only, and had private APIs specific to the Flash Player plugin which were not documented.<ref>{{cite web |last1=Zbarsky|first1=Boris|title=Bug 729481 - Support the "Pepper" Plugin api|url=https://bugzilla.mozilla.org/show_bug.cgi?id=729481#c83|access-date=15 April 2016}}</ref> In October 2016, Mozilla announced that it had re-considered and was exploring whether to incorporate the Pepper API and PDFium in future releases of Firefox,<ref>{{cite web |last=Metz |first=Cade |url=https://wiki.mozilla.org/Mortar_Project |title=Project Mortar |publisher=Mozilla |date=3 October 2016 |access-date=30 October 2016}}</ref> however no such steps were taken. In July 2017, Adobe deprecated Flash and announced its [end-of-life](/source/End-of-life_product) in the end of 2020.<ref>{{Cite web |date=July 25, 2017 |title=Flash & The Future of Interactive Content |url=https://theblog.adobe.com/adobe-flash-update/ |url-status=dead |archive-url=https://web.archive.org/web/20171202123704/https://theblog.adobe.com/adobe-flash-update/ |archive-date=December 2, 2017 |access-date=July 31, 2023 |publisher=[Adobe Inc.](/source/Adobe_Inc.)}}</ref> By January 2021, Adobe Flash Player, Google Chrome, Firefox, Safari, and Windows<ref>{{Cite web |last=Salter |first=Jim |date=2021-05-04 |title=Goodbye again, Flash—Microsoft makes removal from Windows 10 mandatory |url=https://arstechnica.com/gadgets/2021/05/microsoft-will-remove-adobe-flash-from-windows-10-this-summer/ |access-date=2023-08-01 |website=Ars Technica |language=en-us}}</ref> received updates disabling or entirely removing Flash.

== Applications ==

One website<ref>{{cite web |url=https://play.golang.org|title=The Go Playground}}</ref> used NaCl on the server to let users experiment with the [Go programming language](/source/Go_programming_language) from their browsers.<ref>{{cite web |url=https://blog.golang.org/playground#TOC_3.|title=Inside the Go Playground - The Go Blog|website=blog.golang.org|access-date=2016-08-27}}</ref>

== Usage outside of web browsers ==

The [open-source](/source/open-source_software) [Unvanquished](/source/Unvanquished_(video_game)) game makes use of Native Client in the Dæmon game engine<ref>{{cite web|title=Unvanquished Alpha 41 Released, Still Moving Towards NaCl VM Usage|quote=They've continued moving along with their open-source game and Daemon engine. […] their libRocket implementation has moved into the NaCl VM.|url=https://www.phoronix.com/news/Unvanquished-Alpha-41|first=Michael|last=Larabel|date=2015-07-09|access-date=2024-12-03|website=[Phoronix](/source/Phoronix)}}</ref> in replacement of the Q3VM ([Quake III](/source/Quake_III_Arena) [virtual machine](/source/virtual_machine)).<ref>{{cite web|title=Unvanquished Continues Work On Its PNaCl Support|quote=Open-source Unvanquished developers continue working on support for using Google's Portable Native Client (PNaCl) to replace Quake III QVMs.|url=https://www.phoronix.com/news/MTYzMDk|date=2014-03-15|access-date=2024-12-03|website=[Phoronix](/source/Phoronix)}}</ref><ref>{{cite web|title=Unvanquished Alpha 34 Brings Fixes, Still Being Ported To PNaCl|quote=Under the hood, they remain hard at work on porting the game logic from QVMs to Portable Native Client (PNaCl).|url=https://www.phoronix.com/news/MTg1NzA|date=2014-12-08|access-date=2024-12-03|website=[Phoronix](/source/Phoronix)}}</ref> In such game engine, the Native Client sandbox is used to safely run arbitrary game code ([mods](/source/Video_game_modding)) downloaded from game servers. Using the Native Client technology makes possible for [gameplay](/source/gameplay) developers to use the C++ language for games running in the virtual machine, to use C++ libraries, to share code between the game and the engine and to get better performance than with the Q3VM.<ref name="naclInGameEngine">{{cite web|title=Unvanquished Continues Work On Its PNaCl Support|quote=PNaCl sandboxes allow game-play developers to use modern C++ and C/C++ libraries directly within their virtual machines and will allow for better code sharing between the engine code and game logic. PNaCl is also reported to offer better performance than the original Quake III virtual machines.|url=https://www.phoronix.com/news/MTYzMDk|date=2014-03-15|access-date=2024-12-03|website=[Phoronix](/source/Phoronix)}}</ref>

== Reception ==

Some groups of browser developers supported the Native Client technology while others did not.

=== Supporters ===

Chad Austin (of [IMVU](/source/IMVU)) praised the way Native Client can bring high-performance applications to the web (with about 5% penalty compared to native code) in a secure way, while also accelerating the evolution of client-side applications by giving a choice of the programming language used (besides [JavaScript](/source/JavaScript)).<ref>{{cite web |last=Austin |first=Chad |url=http://chadaustin.me/2011/01/in-defense-of-language-democracy/ |title=Chad Austin: In Defense of Language Democracy (Or: Why the Browser Needs a Virtual Machine) |publisher=Chadaustin.me |date=8 January 2011 |access-date=25 April 2012}}</ref>

[Id Software](/source/Id_Software)'s [John D. Carmack](/source/John_D._Carmack) praised Native Client at [QuakeCon](/source/QuakeCon) 2012, saying: "if you have to do something inside a browser, Native Client is much more interesting as something that started out as a really pretty darn clever x86 hack in the way that they could sandbox all of this in user mode interestingly. It's now dynamic recompilation, but something that you program in C or C++ and it compiles down to something that's going to be not your -O4 optimization level for completely native code but pretty damn close to native code. You could do all of your evil pointer chasings, and whatever you want to do as a to-the-metal game developer."<ref>{{cite web |last=Carmack |first=John |url=https://www.youtube.com/watch?v=wt-iVFxgFWk&t=2h36m18s |title=QuakeCon 2012 |publisher=youtube.com |date=3 August 2012 |access-date=26 August 2012}}</ref>

=== Detractors ===

Other IT professionals were more critical of this sandboxing technology as it had substantial or substantive interoperability issues.

[Mozilla](/source/Mozilla)'s vice president of products, [Jay Sullivan](/source/Jay_Sullivan), said that Mozilla has no plans to run native code inside the browser, as "These native apps are just little black boxes in a webpage. [...] We really believe in HTML, and this is where we want to focus."<ref>{{cite web |last=Metz |first=Cade |url=https://www.theregister.co.uk/2010/06/24/jay_sullivan_on_firefox/ |title=Mozilla: Our browser will not run native code |publisher=The Register |date=24 June 2010 |access-date=25 April 2012}}</ref>

Mozilla's [Christopher Blizzard](/source/Christopher_Blizzard) criticized NaCl, claiming that native code cannot evolve in the same way that the source code-driven web can. He also compared NaCl to Microsoft's [ActiveX](/source/ActiveX) technology, plagued with [DLL Hell](/source/DLL_Hell).<ref name="Register"/>

[Håkon Wium Lie](/source/H%C3%A5kon_Wium_Lie), Opera's CTO, believed that "NaCl seems to be 'yearning for the bad old days, before the web'", and that "Native Client is about building a new platform – or porting an old platform into the web [...] it will bring in complexity and security issues, and it will take away focus from the web platform."<ref name="Register"/>

== Second generation ==

The second generation of [sandbox](/source/sandbox_(computer_security))ing developed in Google is [gVisor](/source/gVisor).<ref>{{Cite web|url=https://news.ycombinator.com/item?id=17810591|title=Beta release of PHP 7.2 in the Google App Engine standard environment &#124; Hacker News}}</ref><ref>{{Cite web|url=https://github.com/google/gvisor|title = Google/Gvisor|website = [GitHub](/source/GitHub)|date = 15 October 2021}}</ref> It is intended to replace NaCl in [Google Cloud](/source/Google_Cloud_Platform), to be more exact in [Google App Engine](/source/Google_App_Engine). Google has also been promoting [WebAssembly](/source/WebAssembly).<ref>{{Cite web|last=Avram|first=Abel|date=31 May 2017|title=Google Is to Remove Support for PNaCl|url=https://www.infoq.com/news/2017/05/pnacl-webassembly-google/|access-date=2020-08-01|website=InfoQ|language=en|quote=As a replacement, Google is now pushing WebAssembly.}}</ref>

== See also ==

{{Portal|Free and open-source software}}
*[Application virtualization](/source/Application_virtualization)
*[Emscripten](/source/Emscripten)
*[Sandboxie](/source/Sandboxie), running Windows programs in a sandbox
*[WebAssembly](/source/WebAssembly), a bytecode standard for web browsers
*[XAML Browser Applications](/source/XAML_Browser_Applications) (XBAP)

== References ==

{{reflist|colwidth=30em}}

== External links ==
*{{Official website}}
*{{cite web| url=https://bugs.chromium.org/p/nativeclient/issues/list| title=Issues - nativeclient| website=bugs.chromium.org| accessdate=2022-07-02}}
*{{YouTube|id=5RFjOec-TI0|title=Google I/O 2013 - Introduction to Portable Native Client (PNaCl)}}
*{{YouTube|id=2xV_0pTpNj0|title=Google I/O 2009 Native Code for Compute Intensive Web Apps}} – Technical talk at [Google I/O](/source/Google_I%2FO) 2009
*[https://code.google.com/p/naclports/wiki/PortList A list of OSS projects ported to Native Client]
*[https://chromium.googlesource.com/native_client/src/native_client.git Native Client source code in Git]
*[https://kangz.net/posts/2014/03/15/moving-the-server-side-gamelogic-to-pnacl/first=Corentin Game engine-focused introduction to Native Client with a comparison between the Quake3 Virtual Machine and PNaCL]<br/>{{cite web|title=Moving the server-side gamelogic to PNaCl|url=https://kangz.net/posts/2014/03/15/moving-the-server-side-gamelogic-to-pnacl/|first=Corentin|last=Wallez|date=2014-03-15|access-date=2024-12-03}}

=== Examples ===

*[http://folding.stanford.edu/nacl/ Folding@home]
*[https://gonativeclient.appspot.com/demo PNaCl examples] (runs in Chrome 31+, PNaCl, i.e. no installation needed)
*[https://developer.chrome.com/native-client/sdk/examples Native Client SDK Gallery] {{Webarchive|url=https://web.archive.org/web/20140316211806/https://developer.chrome.com/native-client/sdk/examples |date=16 March 2014 }}
*[https://web.archive.org/web/20180627170813/http://www.torapp.info/ torapp.info], vector editor, especially powerful for security printing (not PNaCl)
*[http://www.naclbox.com/ NACLBox], a port of [DOSBox](/source/DOSBox) to Native Client (PNaCl)
*[https://chrome.google.com/webstore/detail/moehcjggbedbobepfihdamhnlneanioe SodaSynth], a synthesizer for Native Client (not PNaCl)
*[https://luzbel.github.io/vigasocosdl-la-abadia-del-crimen.pruebas/ Abadía del crimen], a port of the SDL version of Vigasoco (remake of [La Abadía del Crimen](/source/La_Abad%C3%ADa_del_Crimen)) to Native Client (PNaCl)
*[http://coldev.webs.com/ Bennugd], a port of Bennugd Videogames examples to Native Client (PNaCl)

{{Google FOSS}}
{{Web interfaces}}

Category:Computer security software
Category:Software using the BSD license
Native Client
Category:Cross-platform free software

---
Adapted from the Wikipedia article [Google Native Client](https://en.wikipedia.org/wiki/Google_Native_Client) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Google_Native_Client?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
