请输入您要查询的百科知识:

 

词条 Google Native Client
释义

  1. Overview

  2. Pepper

     PPAPI   PPAPI in Firefox  

  3. Applications

  4. Reception

     Supporters  Detractors 

  5. Second Generation

  6. See also

  7. References

  8. External links

     Examples 
{{Redirect|Google NaCl|Networking and Cryptography library|NaCl (software)}}{{Use dmy dates|date=April 2012}}{{Infobox software
| name = Google Native Client
| developer = Google, others
| programming language = C, C++
| released = {{start date and age|2011|9|16}}[1]
| latest release version = SDK: Pepper 45 / {{start date and age|df=yes|2015|07|10}}Clients: Same as Google Chrome
| operating system = Windows, Linux, macOS, Chrome OS
| platform = x86, ARM, MIPS
| status = Production (NaCl, PNaCl[2])
| genre = Sandbox in web browsers for native code
| license = New BSD
| website = {{URL|https://developer.chrome.com/native-client}}
}}Google Native Client (NaCl) is a 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 Chrome OS. It may also be used for securing browser plugins, and parts of other applications or full applications[3] such as ZeroVM.[4]

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.[5][6]

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.[7] 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 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.

On October 12, 2016, a comment on the Chromium issue tracker indicated that Google's Pepper and Native Client teams had been destaffed.[8] On May 30, 2017, Google announced deprecation of PNaCl in favor of WebAssembly.[9] Although initially Google planned to remove PNaCl in first quarter of 2018,[9] the removal is currently planned in the second quarter of 2019 (except for Chrome Apps).[10]

Overview

Native Client is an open-source project being developed by Google.[11] To date, Quake,[12] XaoS, Battle for Wesnoth,[13] Doom,[14] Lara Croft and the Guardian of Light,[15] From Dust,[16] and MAME, as well as the sound processing system Csound, have been ported to Native Client. Native Client has been available in the 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.[17][18][19]

An ARM implementation was released in March 2010.[20] x86-64, IA-32, and MIPS are also supported.

To run an application portably under PNaCl, it must be compiled to an architecture-agnostic and stable subset of the LLVM intermediate representation bytecode.[21] The executables are called PNaCl executables (pexes). The PNaCl Toolchain makes .pexe files; NaCl Toolchain .nexe files. The magic number of .nexe files is 0x7F 'E' 'L' 'F', which is ELF. In Chrome, they are translated to architecture-specific executables so that they can be run.

NaCl uses software fault detection and isolation for sandboxing on x86-64 and ARM.[22] 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.[23] 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.[23] Because of these constraints, C and C++ code must be recompiled to run under Native Client, which provides customized versions of the GNU toolchain, specifically GNU Compiler Collection (GCC), GNU Binutils, and LLVM.

Native Client is licensed under a BSD-style license.

Native Client uses Newlib as its C library, but a port of GNU C Library (GNU libc) is also available.[24]

Pepper

{{See also|NPAPI#PPAPI}}

NaCl denotes sodium chloride, common table salt; as a pun, the name of pepper was also used. Pepper API is a cross-platform, open-source API for creating Native Client modules.[25] Pepper Plugin API, or PPAPI[26][27] is a cross-platform API for Native Client-secured web browser plugins, first based on Netscape's NPAPI, then rewritten from scratch. It is currently used in Chromium and Google Chrome to enable the PPAPI version of Adobe Flash[28] and the built-in PDF viewer.[29]

PPAPI

On 12 August 2009, a page on Google Code introduced a new project, Pepper, and the associated Pepper Plugin API (PPAPI),[30] "a set of modifications to NPAPI to make plugins more portable and more secure".[31] This extension is designed specifically to ease implementing out-of-process 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 continuously evolving Pepper API also supports Gamepads (version 19) and WebSockets (version 18).[32]

{{As of|2010|5|13}}, Google's open source browser, Chromium, was the only web browser to use the new browser plug-in model.[33] As of 2015, Pepper is supported by Chrome, Chromium and Blink layout engine-based browsers such as Opera.

PPAPI in Firefox

Mozilla Firefox stated in 2014 that they would not support Pepper, as there is no full specification of the API beyond its implementation in Chrome, which itself is designed for use with Blink layout engine only, and has private APIs specific to the Flash Player plugin which are not documented.[34] 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,[35] however no such steps were taken.

Applications

One website[36] uses NaCL on the server to let users experiment with the Go programming language from their browsers.[37]

Reception

Some groups of browser developers support the Native Client technology, but others do not.

Supporters

Chad Austin (of 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).[38]

Id Software's John D. Carmack praised Native Client at 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."[39]

Detractors

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

Mozilla's vice president of products, 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."[40]

Mozilla's 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 technology, plagued with DLL Hell.[3]

Håkon Wium Lie, Opera's CTO, believes 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."[3]

Second Generation

Second Generation of Sandboxing developed in Google is gVisor.[41][42] It is intended to replace NaCl in Google Cloud, to be more exact in Google App Engine.

See also

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

References

1. ^{{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|date=2011-09-16|accessdate=2016-03-12}}
2. ^{{cite web |url=https://src.chromium.org/viewvc/chrome?view=revision&revision=213999|title=[chrome] Revision 213999|publisher=}}
3. ^{{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?|author= Cade Metz|date=12 September 2011|publisher=The Register|accessdate=17 September 2011}}
4. ^{{cite web |url=http://zerovm.org/architecture.htm |title= ZeroVM Architecture|accessdate=16 March 2014}}
5. ^{{cite web |url=http://download.cnet.com/8301-2007_4-57340015-12/native-client-turns-chrome-into-high-end-gaming-platform/ |title= Native Client turns Chrome into high-end gaming platform |author= Seth Rosenblatt|date=9 December 2011|publisher=CNET|accessdate=9 December 2011}}
6. ^{{cite web |url=http://googlecode.blogspot.com/2011/12/games-apps-and-runtimes-come-to-native.html |title=Google Code Blog: Games, apps and runtimes come to Native Client |publisher=Googlecode.blogspot.com |date=9 December 2011 |accessdate=25 April 2012}}
7. ^{{cite web |url=https://developer.chrome.com/native-client/nacl-and-pnacl#when-to-use-pnacl|title=NaCl and PNaCl|publisher=}}
8. ^{{cite web |url=https://bugs.chromium.org/p/chromium/issues/detail?id=239656#c160 |title=Bugs.chromium.org |date=12 October 2016 | accessdate=12 October 2016}}
9. ^{{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}}
10. ^{{Cite web|url=https://developer.chrome.com/native-client/migration|title=WebAssembly Migration Guide - Google Chrome|website=developer.chrome.com|access-date=2018-12-20}}
11. ^{{cite web |url=https://code.google.com/p/nativeclient/ |title=Google Native Client on Google Code |publisher=Google |accessdate=25 April 2012}}
12. ^{{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}}
13. ^{{cite web |url=https://chrome.google.com/webstore/detail/the-battle-for-wesnoth/pobnonecghmlpppkkjpdiiblmakhhldb|title=The Battle for Wesnoth|publisher=}}
14. ^{{cite web |url=http://doom.pdox.net|title=Index of /|publisher=}}
15. ^https://chrome.google.com/webstore/detail/lara-croft-and-the-guardi/dcfdbmpeeihbpddkneaploeinlbaaodn
16. ^{{cite web |url=https://chrome.google.com/webstore/detail/from-dust/anelkojiepicmcldgnmkplocifmegpfj|title=From Dust|publisher=}}
17. ^{{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 |accessdate=25 April 2012}}
18. ^{{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 |accessdate=25 April 2012}}
19. ^{{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 |accessdate=16 March 2014}}
20. ^{{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|accessdate=19 May 2010}}
21. ^{{cite web|url=http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |title=PNaCl: Portable Native Client Executables |format=PDF |accessdate=25 April 2012 |deadurl=yes |archiveurl=https://web.archive.org/web/20120502135033/http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf |archivedate=2 May 2012 |df=dmy-all }}
22. ^{{cite web |url=http://research.google.com/pubs/pub35649.html|title=Adapting Software Fault Isolation to Contemporary CPU Architectures|author1=David Sehr |author2=Robert Muth |author3=Cliff L. Biffle |author4=Victor Khimenko |author5=Egor Pasko |author6=Bennet Yee |author7=Karl Schimpf |author8=Brad Chen |year=2010|publisher= 19th USENIX Security Symposium|accessdate=31 July 2011}}
23. ^{{cite web |url=http://research.google.com/pubs/pub34913.html|title=Native Client: A Sandbox for Portable, Untrusted x86 Native Code|accessdate=31 July 2011|author1=Bennet Yee |author2=David Sehr |author3=Greg Dardyk |author4=Brad Chen |author5=Robert Muth |author6=Tavis Ormandy |author7=Shiki Okasaka |author8=Neha Narula |author9=Nicholas Fullagar |publisher= IEEE Symposium on Security and Privacy (Oakland'09)|year=2009}}
24. ^{{cite web |url=http://developer.chrome.com/native-client/devguide/devcycle/building |title=Native Client: Building |publisher=developer.chrome.com |accessdate=16 March 2014}}
25. ^{{cite web |url=https://developer.chrome.com/native-client/overview|title=Technical Overview|publisher=}}
26. ^{{cite web |url=https://developer.chrome.com/native-client/pepper_stable/index |title=Pepper Plugin API project at |publisher=Google |accessdate=25 April 2012}}
27. ^{{cite web |url=https://src.chromium.org/viewvc/chrome/trunk/src/ppapi/ |title=Chrome Source: Index of /trunk/src/ppapi |publisher=Src.chromium.org |accessdate=25 April 2012}}
28. ^{{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 |publisher=Google |date=8 August 2012 |accessdate=10 August 2013}}
29. ^{{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 |accessdate=25 April 2012}}
30. ^{{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 |accessdate=25 April 2012}}
31. ^{{cite web |author=Comment by t.hajdu....@gmail.com |url=https://code.google.com/p/ppapi/wiki/Concepts |title=Pepper.wiki |publisher=Google |date=24 February 2012 |accessdate=25 April 2012}}
32. ^{{cite web |url=https://developer.chrome.com/native-client/sdk/release-notes|title=Release Notes|publisher=}}
33. ^{{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 |accessdate=25 April 2012}}
34. ^{{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|accessdate=15 April 2016}}
35. ^{{cite web |last=Metz |first=Cade |url=https://wiki.mozilla.org/Mortar_Project |title=Project Mortar |publisher=Mozilla |date=3 October 2016 |accessdate=30 October 2016}}
36. ^{{cite web |url=https://play.golang.org|title=The Go Playground|publisher=}}
37. ^{{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}}
38. ^{{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 |accessdate=25 April 2012}}
39. ^{{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 |accessdate=26 August 2012}}
40. ^{{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 |accessdate=25 April 2012}}
41. ^https://news.ycombinator.com/item?id=17810591
42. ^https://github.com/google/gvisor

External links

  • {{Official website|https://code.google.com/p/nativeclient}}, Google Project
  • {{Official website|https://developer.chrome.com/native-client}}, developers
  • {{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 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]

Examples

  • 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]
  • torapp.info{{dead link|date=October 2017 |bot=InternetArchiveBot |fix-attempted=yes }}, vector editor, especially powerful for security printing (not PNaCl)
  • NACLBox, a port of DOSBox to Native Client (PNaCl)
  • [https://chrome.google.com/webstore/detail/moehcjggbedbobepfihdamhnlneanioe SodaSynth], a synthesizer for Native Client (not PNaCl)
  • [https://pnacl-amiga-emulator.appspot.com/ pnacl-amiga-emulator], a port of UAE, an Amiga 500 emulator
  • [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) to Native Client (PNaCl)
  • Bennugd, a port of Bennugd Videogames examples to Native Client (PNaCl)
{{Google Inc.}}{{Web interfaces}}

3 : Computer security software|Free software|Google

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/11 6:34:18