diff options
author | jfb@chromium.org <jfb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 22:04:55 +0000 |
---|---|---|
committer | jfb@chromium.org <jfb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-09 22:04:55 +0000 |
commit | 8115602f9c79966502d76f897d50b7e2fb9172ef (patch) | |
tree | b5636363514903eec2181d0b1e54f5ea0077cb83 | |
parent | e59198283e55b39ec9ce742b2afbbd9a363406cb (diff) | |
download | chromium_src-8115602f9c79966502d76f897d50b7e2fb9172ef.zip chromium_src-8115602f9c79966502d76f897d50b7e2fb9172ef.tar.gz chromium_src-8115602f9c79966502d76f897d50b7e2fb9172ef.tar.bz2 |
NaCl documentation: miscellaneous FAQ improvements
R= binji@chromium.org
TEST= none
BUG= none
NOTRY=true
(documentation only change)
Review URL: https://codereview.chromium.org/382603004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282137 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | native_client_sdk/doc_generated/_static/pygments.css | 4 | ||||
-rw-r--r-- | native_client_sdk/doc_generated/faq.html | 197 | ||||
-rw-r--r-- | native_client_sdk/src/doc/faq.rst | 160 |
3 files changed, 181 insertions, 180 deletions
diff --git a/native_client_sdk/doc_generated/_static/pygments.css b/native_client_sdk/doc_generated/_static/pygments.css index 1a14f2a..d79caa1 100644 --- a/native_client_sdk/doc_generated/_static/pygments.css +++ b/native_client_sdk/doc_generated/_static/pygments.css @@ -13,11 +13,11 @@ .highlight .gr { color: #FF0000 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #303030 } /* Generic.Output */ +.highlight .go { color: #333333 } /* Generic.Output */ .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0040D0 } /* Generic.Traceback */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ diff --git a/native_client_sdk/doc_generated/faq.html b/native_client_sdk/doc_generated/faq.html index 2bf6fe1..3b8dbcd 100644 --- a/native_client_sdk/doc_generated/faq.html +++ b/native_client_sdk/doc_generated/faq.html @@ -4,68 +4,68 @@ <h1 id="frequently-asked-questions">Frequently Asked Questions</h1> <div class="contents local" id="contents" style="display: none"> <ul class="small-gap"> -<li><p class="first"><a class="reference internal" href="#what-is-native-client-good-for" id="id3">What is Native Client Good For?</a></p> +<li><p class="first"><a class="reference internal" href="#what-is-native-client-good-for" id="id1">What is Native Client Good For?</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#why-did-google-build-native-client" id="id4">Why did Google build Native Client?</a></li> -<li><a class="reference internal" href="#when-should-i-use-native-client" id="id5">When should I use Native Client?</a></li> -<li><a class="reference internal" href="#when-should-i-use-portable-native-client" id="id6">When should I use Portable Native Client?</a></li> -<li><a class="reference internal" href="#how-fast-does-code-run-in-portable-native-client" id="id7">How fast does code run in Portable Native Client?</a></li> -<li><a class="reference internal" href="#why-use-portable-native-client-instead-of-technology-x" id="id8">Why use Portable Native Client instead of <em><technology X></em>?</a></li> -<li><a class="reference internal" href="#if-i-want-direct-access-to-the-os-should-i-use-native-client" id="id9">If I want direct access to the OS, should I use Native Client?</a></li> +<li><a class="reference internal" href="#why-did-google-build-native-client" id="id2">Why did Google build Native Client?</a></li> +<li><a class="reference internal" href="#when-should-i-use-portable-native-client-instead-of-native-client" id="id3">When should I use Portable Native Client instead of Native Client?</a></li> +<li><a class="reference internal" href="#when-should-i-use-portable-native-client-native-client" id="id4">When should I use Portable Native Client / Native Client?</a></li> +<li><a class="reference internal" href="#how-fast-does-code-run-in-portable-native-client" id="id5">How fast does code run in Portable Native Client?</a></li> +<li><a class="reference internal" href="#why-use-portable-native-client-instead-of-technology-x" id="id6">Why use Portable Native Client instead of <em><technology X></em>?</a></li> +<li><a class="reference internal" href="#if-i-want-direct-access-to-the-os-should-i-use-native-client" id="id7">If I want direct access to the OS, should I use Native Client?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#development-environments-and-tools" id="id10">Development Environments and Tools</a></p> +<li><p class="first"><a class="reference internal" href="#development-environments-and-tools" id="id8">Development Environments and Tools</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#what-development-environment-and-development-operating-system-do-you-recommend" id="id11">What development environment and development operating system do you recommend?</a></li> -<li><a class="reference internal" href="#i-m-not-familiar-with-native-development-tools-can-i-still-use-the-native-client-sdk" id="id12">I’m not familiar with native development tools, can I still use the Native Client SDK?</a></li> +<li><a class="reference internal" href="#what-development-environment-and-development-operating-system-do-you-recommend" id="id9">What development environment and development operating system do you recommend?</a></li> +<li><a class="reference internal" href="#i-m-not-familiar-with-native-development-tools-can-i-still-use-the-native-client-sdk" id="id10">I’m not familiar with native development tools, can I still use the Native Client SDK?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#openness-and-supported-architectures-and-languages" id="id13">Openness, and Supported Architectures and Languages</a></p> +<li><p class="first"><a class="reference internal" href="#openness-and-supported-architectures-and-languages" id="id11">Openness, and Supported Architectures and Languages</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#is-native-client-open-is-it-a-standard" id="id14">Is Native Client open? Is it a standard?</a></li> -<li><a class="reference internal" href="#what-are-the-supported-instruction-set-architectures" id="id15">What are the supported instruction set architectures?</a></li> -<li><a class="reference internal" href="#do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-language" id="id16">Do I have to use C or C++? I’d really like to use another language.</a></li> -<li><a class="reference internal" href="#will-you-only-support-chrome-what-about-other-browsers" id="id17">Will you only support Chrome? What about other browsers?</a></li> -<li><a class="reference internal" href="#what-s-the-difference-between-npapi-and-pepper" id="id18">What’s the difference between NPAPI and Pepper?</a></li> -<li><a class="reference internal" href="#is-npapi-part-of-the-native-client-sdk" id="id19">Is NPAPI part of the Native Client SDK?</a></li> -<li><a class="reference internal" href="#does-native-client-support-simd-vector-instructions" id="id20">Does Native Client support SIMD vector instructions?</a></li> -<li><a class="reference internal" href="#can-i-use-native-client-for-3d-graphics" id="id21">Can I use Native Client for 3D graphics?</a></li> -<li><a class="reference internal" href="#does-native-client-support-concurrency-parallelism" id="id22">Does Native Client support concurrency/parallelism?</a></li> +<li><a class="reference internal" href="#is-native-client-open-is-it-a-standard" id="id12">Is Native Client open? Is it a standard?</a></li> +<li><a class="reference internal" href="#what-are-the-supported-instruction-set-architectures" id="id13">What are the supported instruction set architectures?</a></li> +<li><a class="reference internal" href="#do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-language" id="id14">Do I have to use C or C++? I’d really like to use another language.</a></li> +<li><a class="reference internal" href="#do-you-only-support-chrome-what-about-other-browsers" id="id15">Do you only support Chrome? What about other browsers?</a></li> +<li><a class="reference internal" href="#what-s-the-difference-between-npapi-and-pepper" id="id16">What’s the difference between NPAPI and Pepper?</a></li> +<li><a class="reference internal" href="#is-npapi-part-of-the-native-client-sdk" id="id17">Is NPAPI part of the Native Client SDK?</a></li> +<li><a class="reference internal" href="#does-native-client-support-simd-vector-instructions" id="id18">Does Native Client support SIMD vector instructions?</a></li> +<li><a class="reference internal" href="#can-i-use-native-client-for-3d-graphics" id="id19">Can I use Native Client for 3D graphics?</a></li> +<li><a class="reference internal" href="#does-native-client-support-concurrency-parallelism" id="id20">Does Native Client support concurrency/parallelism?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#coming-soon" id="id23">Coming Soon</a></p> +<li><p class="first"><a class="reference internal" href="#coming-soon" id="id21">Coming Soon</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#do-native-client-modules-have-access-to-external-devices" id="id24">Do Native Client modules have access to external devices?</a></li> +<li><a class="reference internal" href="#do-native-client-modules-have-access-to-external-devices" id="id22">Do Native Client modules have access to external devices?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#security-and-privacy" id="id25">Security and Privacy</a></p> +<li><p class="first"><a class="reference internal" href="#security-and-privacy" id="id23">Security and Privacy</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#what-happens-to-my-data-when-i-use-native-client" id="id26">What happens to my data when I use Native Client?</a></li> -<li><a class="reference internal" href="#how-does-native-client-prevent-sandboxed-code-from-doing-bad-things" id="id27">How does Native Client prevent sandboxed code from doing Bad Things?</a></li> -<li><a class="reference internal" href="#how-does-google-know-that-the-safety-measures-in-native-client-are-sufficient" id="id28">How does Google know that the safety measures in Native Client are sufficient?</a></li> +<li><a class="reference internal" href="#what-happens-to-my-data-when-i-use-native-client" id="id24">What happens to my data when I use Native Client?</a></li> +<li><a class="reference internal" href="#how-does-native-client-prevent-sandboxed-code-from-doing-bad-things" id="id25">How does Native Client prevent sandboxed code from doing Bad Things?</a></li> +<li><a class="reference internal" href="#how-does-google-know-that-the-safety-measures-in-native-client-are-sufficient" id="id26">How does Google know that the safety measures in Native Client are sufficient?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#development" id="id29">Development</a></p> +<li><p class="first"><a class="reference internal" href="#development" id="id27">Development</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#how-do-i-debug" id="id30">How do I debug?</a></li> -<li><a class="reference internal" href="#how-do-i-build-x86-32-x86-64-or-arm-nexes" id="id31">How do I build x86-32, x86-64 or ARM <code>.nexes</code>?</a></li> -<li><a class="reference internal" href="#how-can-my-web-application-determine-which-nexe-to-load" id="id32">How can my web application determine which <code>.nexe</code> to load?</a></li> -<li><a class="reference internal" href="#is-it-possible-to-build-a-native-client-module-with-just-plain-c-not-c" id="id33">Is it possible to build a Native Client module with just plain C (not C++)?</a></li> -<li><a class="reference internal" href="#what-unix-system-calls-can-i-make-through-native-client" id="id34">What UNIX system calls can I make through Native Client?</a></li> -<li><a class="reference internal" href="#is-my-favorite-third-party-library-available-for-native-client" id="id35">Is my favorite third-party library available for Native Client?</a></li> -<li><a class="reference internal" href="#do-all-the-files-in-an-application-need-to-be-served-from-the-same-domain" id="id36">Do all the files in an application need to be served from the same domain?</a></li> +<li><a class="reference internal" href="#how-do-i-debug" id="id28">How do I debug?</a></li> +<li><a class="reference internal" href="#how-do-i-build-x86-32-x86-64-or-arm-nexes" id="id29">How do I build x86-32, x86-64 or ARM <code>.nexes</code>?</a></li> +<li><a class="reference internal" href="#how-can-my-web-application-determine-which-nexe-to-load" id="id30">How can my web application determine which <code>.nexe</code> to load?</a></li> +<li><a class="reference internal" href="#is-it-possible-to-build-a-native-client-module-with-just-plain-c-not-c" id="id31">Is it possible to build a Native Client module with just plain C (not C++)?</a></li> +<li><a class="reference internal" href="#what-unix-system-calls-can-i-make-through-native-client" id="id32">What UNIX system calls can I make through Native Client?</a></li> +<li><a class="reference internal" href="#is-my-favorite-third-party-library-available-for-native-client" id="id33">Is my favorite third-party library available for Native Client?</a></li> +<li><a class="reference internal" href="#do-all-the-files-in-an-application-need-to-be-served-from-the-same-domain" id="id34">Do all the files in an application need to be served from the same domain?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#portability" id="id37">Portability</a></p> +<li><p class="first"><a class="reference internal" href="#portability" id="id35">Portability</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#do-i-have-to-do-anything-special-to-make-my-application-run-on-different-operating-systems" id="id38">Do I have to do anything special to make my application run on different operating systems?</a></li> -<li><a class="reference internal" href="#how-easy-is-it-to-port-my-existing-native-code-to-native-client" id="id39">How easy is it to port my existing native code to Native Client?</a></li> +<li><a class="reference internal" href="#do-i-have-to-do-anything-special-to-make-my-application-run-on-different-operating-systems" id="id36">Do I have to do anything special to make my application run on different operating systems?</a></li> +<li><a class="reference internal" href="#how-easy-is-it-to-port-my-existing-native-code-to-native-client" id="id37">How easy is it to port my existing native code to Native Client?</a></li> </ul> </li> -<li><p class="first"><a class="reference internal" href="#troubleshooting" id="id40">Troubleshooting</a></p> +<li><p class="first"><a class="reference internal" href="#troubleshooting" id="id38">Troubleshooting</a></p> <ul class="small-gap"> -<li><a class="reference internal" href="#my-pexe-isn-t-loading-help" id="id41">My <code>.pexe</code> isn’t loading, help!</a></li> -<li><a class="reference internal" href="#my-nexe-files-never-finish-loading-what-gives" id="id42">My <code>.nexe</code> files never finish loading. What gives?</a></li> +<li><a class="reference internal" href="#my-pexe-isn-t-loading-help" id="id39">My <code>.pexe</code> isn’t loading, help!</a></li> +<li><a class="reference internal" href="#my-nexe-files-never-finish-loading-what-gives" id="id40">My <code>.nexe</code> files never finish loading. What gives?</a></li> </ul> </li> </ul> @@ -125,25 +125,30 @@ gains support for new processors and fully uses their capabilities.</li> </ul> <p>For more details, refer to the <a class="reference internal" href="/native-client/nacl-and-pnacl.html"><em>history behind and comparison of NaCl and PNaCl</em></a>.</p> -</section><section id="when-should-i-use-native-client"> -<h3 id="when-should-i-use-native-client">When should I use Native Client?</h3> +</section><section id="when-should-i-use-portable-native-client-instead-of-native-client"> +<h3 id="when-should-i-use-portable-native-client-instead-of-native-client">When should I use Portable Native Client instead of Native Client?</h3> +<p>See <a class="reference internal" href="/native-client/nacl-and-pnacl.html"><em>NaCl and PNaCl</em></a>. In short: PNaCl works on the Open +Web platform delivered by Chrome whereas NaCl only works on the Chrome Web +Store.</p> +</section><section id="when-should-i-use-portable-native-client-native-client"> +<h3 id="when-should-i-use-portable-native-client-native-client">When should I use Portable Native Client / Native Client?</h3> <p>The following are some typical use cases. For details, see the <a class="reference internal" href="/native-client/overview.html"><em>Technical Overview</em></a>.</p> <ul class="small-gap"> -<li>Porting existing software components for use in a web application.</li> -<li>Porting legacy desktop applications.</li> -<li>Handling browser-side encryption and decryption for an enterprise -application.</li> +<li>Porting existing applications or software components, written in C/C++ or +virtual machines written in C/C++, for use in a web application.</li> +<li><p class="first">Using compute-intensive applications, including threads and SIMD, such as:</p> +<ul class="small-gap"> +<li>Scientific computing.</li> <li>Handling multimedia for a web application.</li> -<li>Handling various aspects of web-based games, including physics engines -and AI.</li> +<li>Various aspects of web-based games, including physics engines and AI.</li> +</ul> +</li> +<li>Running untrusted code on a server or within an application (such as a plugin +system for a game).</li> </ul> -<p>Native Client is a versatile technology; we expect that it will also be +<p>Portable Native Client and Native Client are versatile technologies which are used in many other contexts outside of Chrome.</p> -</section><section id="when-should-i-use-portable-native-client"> -<h3 id="when-should-i-use-portable-native-client">When should I use Portable Native Client?</h3> -<p>See <a class="reference internal" href="/native-client/nacl-and-pnacl.html"><em>NaCl and PNaCl</em></a>. In short: PNaCl works on the -open web whereas NaCl only works on the Chrome Web Store.</p> </section><section id="how-fast-does-code-run-in-portable-native-client"> <h3 id="how-fast-does-code-run-in-portable-native-client">How fast does code run in Portable Native Client?</h3> <p>Fast! The SPEC2k benchmarks (C, C++ and floating-point benchmarks) give @@ -173,6 +178,7 @@ native code such as <a class="reference internal" href="/native-client/reference <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-language-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</p> <p>For details, see:</p> <ul class="small-gap"> +<li><a class="reference external" href="https://www.youtube.com/watch?v=675znN6tntw&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_">PNaCl SIMD: Speed on the Web</a>.</li> <li><a class="reference external" href="https://nativeclient.googlecode.com/svn/data/site/NaCl_SFI.pdf">Adapting Software Fault Isolation to Contemporary CPU Architectures</a> (PDF).</li> <li><a class="reference external" href="http://research.google.com/pubs/pub34913.html">Native Client: A Sandbox for Portable, Untrusted x86 Code</a> (PDF).</li> </ul> @@ -198,11 +204,12 @@ see later sections of this FAQ.</p> <h2 id="development-environments-and-tools">Development Environments and Tools</h2> <section id="what-development-environment-and-development-operating-system-do-you-recommend"> <h3 id="what-development-environment-and-development-operating-system-do-you-recommend">What development environment and development operating system do you recommend?</h3> -<p>You can develop on Windows, Mac, or Linux, and the resulting Native -Client or Portable Native Client application will run inside the Google -Chrome browser on all those platforms as well as ChromeOS. You can also -develop on ChromeOS with <a class="reference external" href="https://github.com/dnschneid/crouton">Crouton</a>, and we’re working on -self-hosting a full development environment on Portable Native Client.</p> +<p>You can develop on Windows, Mac, or Linux, and the resulting Native Client or +Portable Native Client application will run inside the Google Chrome browser on +all those platforms as well as ChromeOS. You can also develop on ChromeOS with +<a class="reference external" href="https://github.com/dnschneid/crouton">Crouton</a> or our <a class="reference external" href="https://www.youtube.com/watch?v=OzNuzBDEWzk&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_">experimental development environment which runs within NaCl</a>, +and we’re working on self-hosting a full development environment on Portable +Native Client.</p> <p>Any editor+shell combination should work as well as IDEs like Eclipse, Visual Studio with the <a class="reference internal" href="/native-client/devguide/devcycle/vs-addin.html"><em>Native Client Add-In</em></a> on Windows, or Xcode on Mac OSX.</p> </section><section id="i-m-not-familiar-with-native-development-tools-can-i-still-use-the-native-client-sdk"> @@ -211,9 +218,9 @@ Visual Studio with the <a class="reference internal" href="/native-client/devgui instructions</em></a> useful, and you can look at the code and Makefiles for the SDK examples to understand how the examples are built and run.</p> -<p>You’ll need to learn how to use some tools (like GCC, LLVM, make, -Eclipse, Visual Studio, or Xcode) before you can get very far with the -SDK. Try seaching for an <a class="reference external" href="https://www.google.com/search?q=gcc+introduction">introduction to GCC</a>.</p> +<p>You’ll need to learn how to use some tools (like GCC, LLVM, make, Eclipse, +Visual Studio, or Xcode) before you can get very far with the SDK. Try seaching +for an <a class="reference external" href="https://www.google.com/search?q=gcc+introduction">introduction to GCC</a>.</p> </section></section><section id="openness-and-supported-architectures-and-languages"> <h2 id="openness-and-supported-architectures-and-languages">Openness, and Supported Architectures and Languages</h2> <section id="is-native-client-open-is-it-a-standard"> @@ -244,20 +251,17 @@ architectures without requiring recompilation. The web is better when it’s platform-independent, and we’d like it to stay that way.</p> </section><section id="do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-language"> <span id="other-languages"></span><h3 id="do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-language"><span id="other-languages"></span>Do I have to use C or C++? I’d really like to use another language.</h3> -<p>Right now only C and C++ are supported directly by the toolchain in the -SDK. C# and other languages in the .NET family are supported via the -<a class="reference external" href="https://github.com/elijahtaylor/mono">Mono port</a> for Native -Client. Moreover, there are several ongoing projects to support -additional language runtimes (e.g. <a class="reference external" href="https://code.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools">naclports supports Lua, Python and -Ruby</a>) -as well as to compile more languages to LLVM’s intermediate -representation (e.g. support Haskell with <a class="reference external" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html">GHC</a> -or support Fortran with <a class="reference external" href="https://flang-gsoc.blogspot.ie/2013/09/end-of-gsoc-report.html">flang</a>), or +<p>Right now only C and C++ are supported directly by the toolchain in the SDK. C# +and other languages in the .NET family are supported via the <a class="reference external" href="https://github.com/elijahtaylor/mono">Mono port</a> for +Native Client. Moreover, there are several ongoing projects to support +additional language runtimes (e.g. <a class="reference external" href="https://code.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools">naclports supports Lua, Python and Ruby</a>) +as well as to compile more languages to LLVM’s intermediate representation +(e.g. support <a class="reference external" href="http://halide-lang.org/">Halide</a>, Haskell with <a class="reference external" href="http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html">GHC</a> or support Fortran with <a class="reference external" href="https://flang-gsoc.blogspot.ie/2013/09/end-of-gsoc-report.html">flang</a>), or transpile languages to C/C++ (source-to-source compilation).</p> <p>If you’re interested in getting other languages working, please contact the -Native Client team by way of the <a class="reference external" href="https://groups.google.com/group/native-client-discuss">native-client-discuss mailing list</a>.</p> -</section><section id="will-you-only-support-chrome-what-about-other-browsers"> -<h3 id="will-you-only-support-chrome-what-about-other-browsers">Will you only support Chrome? What about other browsers?</h3> +Native Client team by way of the <a class="reference external" href="https://groups.google.com/group/native-client-discuss">native-client-discuss</a> mailing list.</p> +</section><section id="do-you-only-support-chrome-what-about-other-browsers"> +<h3 id="do-you-only-support-chrome-what-about-other-browsers">Do you only support Chrome? What about other browsers?</h3> <p>We aim to support multiple browsers. However, a number of features that we consider requirements for a production-quality system that keeps the user safe are difficult to implement without help from the @@ -274,8 +278,7 @@ handling, out-of-process plugins, and asynchronous interfaces. Native Client has transitioned from using NPAPI to using Pepper.</p> </section><section id="is-npapi-part-of-the-native-client-sdk"> <h3 id="is-npapi-part-of-the-native-client-sdk">Is NPAPI part of the Native Client SDK?</h3> -<p>NPAPI is not supported by the Native Client SDK, and is <a class="reference external" href="http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html">deprecated in -Chrome</a>.</p> +<p>NPAPI is not supported by the Native Client SDK, and is <a class="reference external" href="http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html">deprecated in Chrome</a>.</p> </section><section id="does-native-client-support-simd-vector-instructions"> <h3 id="does-native-client-support-simd-vector-instructions">Does Native Client support SIMD vector instructions?</h3> <p>Native Client currently supports SSE on x86 and NEON on ARM. Support for @@ -288,13 +291,12 @@ AVX on x86 is under way.</p> <p>To alert the user regarding their hardware platform’s 3D feature set before loading a large NaCl application, see <a class="reference internal" href="/native-client/devguide/coding/3D-graphics.html"><em>Vetting the driver in Javascript</em></a>.</p> -<p>Some GL extensions are exposed to Native Client applications, see the -<a class="reference external" href="https://src.chromium.org/viewvc/chrome/trunk/src/ppapi/lib/gl/gles2/gles2.c">GLES2 file</a>. -This file is part of the GL wrapper supplied by the library -<code>ppapi_gles2</code> which you’ll want to include in your project. In most -cases extensions map to extensions available on other platforms, or -differ very slightly (if they differ, the extension is usually CHROMIUM -or ANGLE instead of EXT).</p> +<p>Some GL extensions are exposed to Native Client applications, see the <a class="reference external" href="https://code.google.com/p/chromium/codesearch#chromium/src/ppapi/lib/gl/gles2/gles2.c">GLES2 +file</a>. This file is part of the GL wrapper supplied by the library +<code>ppapi_gles2</code> which you’ll want to include in your project. In most cases +extensions map to extensions available on other platforms, or differ very +slightly (if they differ, the extension is usually CHROMIUM or ANGLE instead of +EXT).</p> </section><section id="does-native-client-support-concurrency-parallelism"> <h3 id="does-native-client-support-concurrency-parallelism">Does Native Client support concurrency/parallelism?</h3> <p>Native Client and Portable Native Client both support pthreads, @@ -329,9 +331,8 @@ Native Client. Crashes in your code won’t otherwise send your information to Google: Google counts the number of such crashes, but does so anonymously without sending your application’s data or its debug information.</p> -<p>For additional information about privacy and Chrome, see the <a class="reference external" href="https://www.google.com/chrome/intl/en/privacy.html">Google -Chrome privacy policy</a> and the <a class="reference external" href="https://www.google.com/chrome/intl/en/eula_text.html">Google -Chrome Terms of Service</a>.</p> +<p>For additional information about privacy and Chrome, see the <a class="reference external" href="https://www.google.com/chrome/intl/en/privacy.html">Google Chrome +privacy policy</a> and the <a class="reference external" href="https://www.google.com/chrome/intl/en/eula_text.html">Google Chrome Terms of Service</a>.</p> </section><section id="how-does-native-client-prevent-sandboxed-code-from-doing-bad-things"> <h3 id="how-does-native-client-prevent-sandboxed-code-from-doing-bad-things">How does Native Client prevent sandboxed code from doing Bad Things?</h3> <p>Native Client’s sandbox works by validating the untrusted code (the @@ -357,25 +358,23 @@ compiler isn’t trusted. The same applies to Portable Native Client where even the <code>.pexe</code> to <code>.nexe</code> translator, a simplified compiler backend, isn’t trusted: it is validated before executing, and so is its output.</p> -<p>In addition to static analysis of untrusted code, the Native Client -runtime also includes an outer sandbox that mediates system calls. For -more details about both sandboxes, see <a class="reference external" href="http://research.google.com/pubs/pub34913.html">Native Client: A Sandbox for -Portable, Untrusted x86 Code</a> +<p>In addition to static analysis of untrusted code, the Native Client runtime also +includes an outer sandbox that mediates system calls. For more details about +both sandboxes, see <a class="reference external" href="http://research.google.com/pubs/pub34913.html">Native Client: A Sandbox for Portable, Untrusted x86 Code</a> (PDF).</p> </section><section id="how-does-google-know-that-the-safety-measures-in-native-client-are-sufficient"> <h3 id="how-does-google-know-that-the-safety-measures-in-native-client-are-sufficient">How does Google know that the safety measures in Native Client are sufficient?</h3> -<p>Google has taken several steps to ensure that Native Client’s security -works, including:</p> +<p>Google has taken several steps to ensure that Native Client’s security works, +including:</p> <ul class="small-gap"> <li>Open source, peer-reviewed papers describing the design.</li> <li>A <a class="reference internal" href="/native-client/community/security-contest/index.html"><em>security contest</em></a>.</li> <li>Multiple internal and external security reviews.</li> <li>The ongoing vigilance of our engineering and developer community.</li> </ul> -<p>Google is committed to making Native Client safer than JavaScript and -other popular browser technologies. If you have suggestions for security -improvements, let the team know, by way of the <a class="reference external" href="https://groups.google.com/group/native-client-discuss">native-client-discuss -mailing list</a>.</p> +<p>Google is committed to making Native Client safer than JavaScript and other +popular browser technologies. If you have suggestions for security improvements, +let the team know, by way of the <a class="reference external" href="https://groups.google.com/group/native-client-discuss">native-client-discuss</a> mailing list.</p> </section></section><section id="development"> <h2 id="development">Development</h2> <section id="how-do-i-debug"> @@ -416,10 +415,10 @@ Native Client provides an <code>mmap()</code> system call that behaves much like the standard UNIX <code>mmap()</code> system call.</p> </section><section id="is-my-favorite-third-party-library-available-for-native-client"> <h3 id="is-my-favorite-third-party-library-available-for-native-client">Is my favorite third-party library available for Native Client?</h3> -<p>Google has ported several third-party libraries to Native Client; such -libraries are available in the <a class="reference external" href="https://code.google.com/p/naclports">naclports</a> project. We encourage you to -contribute libraries to naclports, and/or to host your own ported -libraries, and to <a class="reference external" href="https://groups.google.com/group/native-client-discuss">let the team know about it</a> when you do.</p> +<p>Google has ported several third-party libraries to Native Client; such libraries +are available in the <a class="reference external" href="https://code.google.com/p/naclports">naclports</a> project. We encourage you to contribute +libraries to naclports, and/or to host your own ported libraries, and to let the +team know about it on <a class="reference external" href="https://groups.google.com/group/native-client-discuss">native-client-discuss</a> when you do.</p> </section><section id="do-all-the-files-in-an-application-need-to-be-served-from-the-same-domain"> <h3 id="do-all-the-files-in-an-application-need-to-be-served-from-the-same-domain">Do all the files in an application need to be served from the same domain?</h3> <p>The <code>.nmf</code>, and <code>.nexe</code> or <code>.pexe</code> files must either be served from the diff --git a/native_client_sdk/src/doc/faq.rst b/native_client_sdk/src/doc/faq.rst index 37b84fe..640c794 100644 --- a/native_client_sdk/src/doc/faq.rst +++ b/native_client_sdk/src/doc/faq.rst @@ -70,28 +70,32 @@ Portable Native client further enhances the above: For more details, refer to the :doc:`history behind and comparison of NaCl and PNaCl <nacl-and-pnacl>`. -When should I use Native Client? --------------------------------- +When should I use Portable Native Client instead of Native Client? +------------------------------------------------------------------ + +See :doc:`NaCl and PNaCl <nacl-and-pnacl>`. In short: PNaCl works on the Open +Web platform delivered by Chrome whereas NaCl only works on the Chrome Web +Store. + +When should I use Portable Native Client / Native Client? +--------------------------------------------------------- The following are some typical use cases. For details, see the :doc:`Technical Overview <overview>`. -* Porting existing software components for use in a web application. -* Porting legacy desktop applications. -* Handling browser-side encryption and decryption for an enterprise - application. -* Handling multimedia for a web application. -* Handling various aspects of web-based games, including physics engines - and AI. +* Porting existing applications or software components, written in C/C++ or + virtual machines written in C/C++, for use in a web application. +* Using compute-intensive applications, including threads and SIMD, such as: -Native Client is a versatile technology; we expect that it will also be -used in many other contexts outside of Chrome. + * Scientific computing. + * Handling multimedia for a web application. + * Various aspects of web-based games, including physics engines and AI. -When should I use Portable Native Client? ------------------------------------------ +* Running untrusted code on a server or within an application (such as a plugin + system for a game). -See :doc:`NaCl and PNaCl <nacl-and-pnacl>`. In short: PNaCl works on the -open web whereas NaCl only works on the Chrome Web Store. +Portable Native Client and Native Client are versatile technologies which are +used in many other contexts outside of Chrome. How fast does code run in Portable Native Client? ------------------------------------------------- @@ -119,10 +123,9 @@ native code such as :ref:`threading <language_support_threading>` and For details, see: -* `Adapting Software Fault Isolation to Contemporary CPU Architectures - <https://nativeclient.googlecode.com/svn/data/site/NaCl_SFI.pdf>`_ (PDF). -* `Native Client: A Sandbox for Portable, Untrusted x86 Code - <http://research.google.com/pubs/pub34913.html>`_ (PDF). +* `PNaCl SIMD: Speed on the Web`_. +* `Adapting Software Fault Isolation to Contemporary CPU Architectures`_ (PDF). +* `Native Client: A Sandbox for Portable, Untrusted x86 Code`_ (PDF). If your code isn't performing as close to native speed as you'd expect, :doc:`let us know <help>`! @@ -158,11 +161,12 @@ Development Environments and Tools What development environment and development operating system do you recommend? ------------------------------------------------------------------------------- -You can develop on Windows, Mac, or Linux, and the resulting Native -Client or Portable Native Client application will run inside the Google -Chrome browser on all those platforms as well as ChromeOS. You can also -develop on ChromeOS with Crouton_, and we're working on -self-hosting a full development environment on Portable Native Client. +You can develop on Windows, Mac, or Linux, and the resulting Native Client or +Portable Native Client application will run inside the Google Chrome browser on +all those platforms as well as ChromeOS. You can also develop on ChromeOS with +Crouton_ or our `experimental development environment which runs within NaCl`_, +and we're working on self-hosting a full development environment on Portable +Native Client. Any editor+shell combination should work as well as IDEs like Eclipse, Visual Studio with the :doc:`Native Client Add-In @@ -176,10 +180,9 @@ instructions <devguide/devcycle/building>` useful, and you can look at the code and Makefiles for the SDK examples to understand how the examples are built and run. -You'll need to learn how to use some tools (like GCC, LLVM, make, -Eclipse, Visual Studio, or Xcode) before you can get very far with the -SDK. Try seaching for an `introduction to GCC -<https://www.google.com/search?q=gcc+introduction>`_. +You'll need to learn how to use some tools (like GCC, LLVM, make, Eclipse, +Visual Studio, or Xcode) before you can get very far with the SDK. Try seaching +for an `introduction to GCC`_. Openness, and Supported Architectures and Languages @@ -224,26 +227,19 @@ it's platform-independent, and we'd like it to stay that way. Do I have to use C or C++? I'd really like to use another language. ------------------------------------------------------------------- -Right now only C and C++ are supported directly by the toolchain in the -SDK. C# and other languages in the .NET family are supported via the -`Mono port <https://github.com/elijahtaylor/mono>`_ for Native -Client. Moreover, there are several ongoing projects to support -additional language runtimes (e.g. `naclports supports Lua, Python and -Ruby -<https://code.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools>`_) -as well as to compile more languages to LLVM's intermediate -representation (e.g. support Haskell with `GHC -<http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html>`_ -or support Fortran with `flang -<https://flang-gsoc.blogspot.ie/2013/09/end-of-gsoc-report.html>`_), or +Right now only C and C++ are supported directly by the toolchain in the SDK. C# +and other languages in the .NET family are supported via the `Mono port`_ for +Native Client. Moreover, there are several ongoing projects to support +additional language runtimes (e.g. `naclports supports Lua, Python and Ruby`_) +as well as to compile more languages to LLVM's intermediate representation +(e.g. support Halide_, Haskell with GHC_ or support Fortran with flang_), or transpile languages to C/C++ (source-to-source compilation). If you're interested in getting other languages working, please contact the -Native Client team by way of the `native-client-discuss mailing list -<https://groups.google.com/group/native-client-discuss>`_. +Native Client team by way of the native-client-discuss_ mailing list. -Will you only support Chrome? What about other browsers? --------------------------------------------------------- +Do you only support Chrome? What about other browsers? +------------------------------------------------------ We aim to support multiple browsers. However, a number of features that we consider requirements for a production-quality system that keeps the @@ -265,9 +261,7 @@ Client has transitioned from using NPAPI to using Pepper. Is NPAPI part of the Native Client SDK? --------------------------------------- -NPAPI is not supported by the Native Client SDK, and is `deprecated in -Chrome -<http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html>`_. +NPAPI is not supported by the Native Client SDK, and is `deprecated in Chrome`_. Does Native Client support SIMD vector instructions? ---------------------------------------------------- @@ -281,21 +275,18 @@ Portable Native Client supports portable SIMD vectors, as detailed in Can I use Native Client for 3D graphics? ---------------------------------------- -Yes. Native Client supports `OpenGL ES 2.0 -<https://www.khronos.org/opengles/>`_. +Yes. Native Client supports `OpenGL ES 2.0`_. To alert the user regarding their hardware platform's 3D feature set before loading a large NaCl application, see :doc:`Vetting the driver in Javascript <devguide/coding/3D-graphics>`. -Some GL extensions are exposed to Native Client applications, see the -`GLES2 file -<https://src.chromium.org/viewvc/chrome/trunk/src/ppapi/lib/gl/gles2/gles2.c>`_. -This file is part of the GL wrapper supplied by the library -``ppapi_gles2`` which you'll want to include in your project. In most -cases extensions map to extensions available on other platforms, or -differ very slightly (if they differ, the extension is usually CHROMIUM -or ANGLE instead of EXT). +Some GL extensions are exposed to Native Client applications, see the `GLES2 +file`_. This file is part of the GL wrapper supplied by the library +``ppapi_gles2`` which you'll want to include in your project. In most cases +extensions map to extensions available on other platforms, or differ very +slightly (if they differ, the extension is usually CHROMIUM or ANGLE instead of +EXT). .. TODO Improve documentation for GL extensions. @@ -347,11 +338,8 @@ information to Google: Google counts the number of such crashes, but does so anonymously without sending your application's data or its debug information. -For additional information about privacy and Chrome, see the `Google -Chrome privacy policy -<https://www.google.com/chrome/intl/en/privacy.html>`_ and the `Google -Chrome Terms of Service -<https://www.google.com/chrome/intl/en/eula_text.html>`_. +For additional information about privacy and Chrome, see the `Google Chrome +privacy policy`_ and the `Google Chrome Terms of Service`_. How does Native Client prevent sandboxed code from doing Bad Things? -------------------------------------------------------------------- @@ -380,27 +368,25 @@ even the ``.pexe`` to ``.nexe`` translator, a simplified compiler backend, isn't trusted: it is validated before executing, and so is its output. -In addition to static analysis of untrusted code, the Native Client -runtime also includes an outer sandbox that mediates system calls. For -more details about both sandboxes, see `Native Client: A Sandbox for -Portable, Untrusted x86 Code <http://research.google.com/pubs/pub34913.html>`_ +In addition to static analysis of untrusted code, the Native Client runtime also +includes an outer sandbox that mediates system calls. For more details about +both sandboxes, see `Native Client: A Sandbox for Portable, Untrusted x86 Code`_ (PDF). How does Google know that the safety measures in Native Client are sufficient? ------------------------------------------------------------------------------ -Google has taken several steps to ensure that Native Client's security -works, including: +Google has taken several steps to ensure that Native Client's security works, +including: * Open source, peer-reviewed papers describing the design. * A :doc:`security contest <community/security-contest/index>`. * Multiple internal and external security reviews. * The ongoing vigilance of our engineering and developer community. -Google is committed to making Native Client safer than JavaScript and -other popular browser technologies. If you have suggestions for security -improvements, let the team know, by way of the `native-client-discuss -mailing list <https://groups.google.com/group/native-client-discuss>`_. +Google is committed to making Native Client safer than JavaScript and other +popular browser technologies. If you have suggestions for security improvements, +let the team know, by way of the native-client-discuss_ mailing list. Development =========== @@ -456,11 +442,10 @@ the standard UNIX ``mmap()`` system call. Is my favorite third-party library available for Native Client? --------------------------------------------------------------- -Google has ported several third-party libraries to Native Client; such -libraries are available in the naclports_ project. We encourage you to -contribute libraries to naclports, and/or to host your own ported -libraries, and to `let the team know about it -<https://groups.google.com/group/native-client-discuss>`_ when you do. +Google has ported several third-party libraries to Native Client; such libraries +are available in the naclports_ project. We encourage you to contribute +libraries to naclports, and/or to host your own ported libraries, and to let the +team know about it on native-client-discuss_ when you do. Do all the files in an application need to be served from the same domain? -------------------------------------------------------------------------- @@ -571,6 +556,23 @@ Here are ways to resolve some common problems that can prevent loading: Client. * If things still aren't working, :doc:`ask for help <help>`! -.. _CORS: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing -.. _naclports: https://code.google.com/p/naclports + +.. _`PNaCl SIMD: Speed on the Web`: https://www.youtube.com/watch?v=675znN6tntw&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_ +.. _Adapting Software Fault Isolation to Contemporary CPU Architectures: https://nativeclient.googlecode.com/svn/data/site/NaCl_SFI.pdf +.. _`Native Client: A Sandbox for Portable, Untrusted x86 Code`: http://research.google.com/pubs/pub34913.html .. _Crouton: https://github.com/dnschneid/crouton +.. _experimental development environment which runs within NaCl: https://www.youtube.com/watch?v=OzNuzBDEWzk&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_ +.. _introduction to GCC: https://www.google.com/search?q=gcc+introduction +.. _Mono port: https://github.com/elijahtaylor/mono +.. _naclports supports Lua, Python and Ruby: https://code.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools +.. _Halide: http://halide-lang.org/ +.. _GHC: http://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html +.. _flang: https://flang-gsoc.blogspot.ie/2013/09/end-of-gsoc-report.html +.. _native-client-discuss: https://groups.google.com/group/native-client-discuss +.. _deprecated in Chrome: http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend-npapi.html +.. _OpenGL ES 2.0: https://www.khronos.org/opengles/ +.. _GLES2 file: https://code.google.com/p/chromium/codesearch#chromium/src/ppapi/lib/gl/gles2/gles2.c +.. _Google Chrome privacy policy: https://www.google.com/chrome/intl/en/privacy.html +.. _Google Chrome Terms of Service: https://www.google.com/chrome/intl/en/eula_text.html +.. _naclports: https://code.google.com/p/naclports +.. _CORS: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing |