OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="frequently-asked-questions"> | 3 <section id="frequently-asked-questions"> |
4 <h1 id="frequently-asked-questions">Frequently Asked Questions</h1> | 4 <h1 id="frequently-asked-questions">Frequently Asked Questions</h1> |
5 <div class="contents local" id="contents" style="display: none"> | 5 <div class="contents local" id="contents" style="display: none"> |
6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
7 <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> | 7 <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> |
8 <ul class="small-gap"> | 8 <ul class="small-gap"> |
9 <li><a class="reference internal" href="#why-did-google-build-native-client" id=
"id4">Why did Google build Native Client?</a></li> | 9 <li><a class="reference internal" href="#why-did-google-build-native-client" id=
"id2">Why did Google build Native Client?</a></li> |
10 <li><a class="reference internal" href="#when-should-i-use-native-client" id="id
5">When should I use Native Client?</a></li> | 10 <li><a class="reference internal" href="#when-should-i-use-portable-native-clien
t-instead-of-native-client" id="id3">When should I use Portable Native Client in
stead of Native Client?</a></li> |
11 <li><a class="reference internal" href="#when-should-i-use-portable-native-clien
t" id="id6">When should I use Portable Native Client?</a></li> | 11 <li><a class="reference internal" href="#when-should-i-use-portable-native-clien
t-native-client" id="id4">When should I use Portable Native Client / Native Clie
nt?</a></li> |
12 <li><a class="reference internal" href="#how-fast-does-code-run-in-portable-nati
ve-client" id="id7">How fast does code run in Portable Native Client?</a></li> | 12 <li><a class="reference internal" href="#how-fast-does-code-run-in-portable-nati
ve-client" id="id5">How fast does code run in Portable Native Client?</a></li> |
13 <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><tech
nology X></em>?</a></li> | 13 <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><tech
nology X></em>?</a></li> |
14 <li><a class="reference internal" href="#if-i-want-direct-access-to-the-os-shoul
d-i-use-native-client" id="id9">If I want direct access to the OS, should I use
Native Client?</a></li> | 14 <li><a class="reference internal" href="#if-i-want-direct-access-to-the-os-shoul
d-i-use-native-client" id="id7">If I want direct access to the OS, should I use
Native Client?</a></li> |
15 </ul> | 15 </ul> |
16 </li> | 16 </li> |
17 <li><p class="first"><a class="reference internal" href="#development-environmen
ts-and-tools" id="id10">Development Environments and Tools</a></p> | 17 <li><p class="first"><a class="reference internal" href="#development-environmen
ts-and-tools" id="id8">Development Environments and Tools</a></p> |
18 <ul class="small-gap"> | 18 <ul class="small-gap"> |
19 <li><a class="reference internal" href="#what-development-environment-and-develo
pment-operating-system-do-you-recommend" id="id11">What development environment
and development operating system do you recommend?</a></li> | 19 <li><a class="reference internal" href="#what-development-environment-and-develo
pment-operating-system-do-you-recommend" id="id9">What development environment a
nd development operating system do you recommend?</a></li> |
20 <li><a class="reference internal" href="#i-m-not-familiar-with-native-developmen
t-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> | 20 <li><a class="reference internal" href="#i-m-not-familiar-with-native-developmen
t-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> |
21 </ul> | 21 </ul> |
22 </li> | 22 </li> |
23 <li><p class="first"><a class="reference internal" href="#openness-and-supported
-architectures-and-languages" id="id13">Openness, and Supported Architectures an
d Languages</a></p> | 23 <li><p class="first"><a class="reference internal" href="#openness-and-supported
-architectures-and-languages" id="id11">Openness, and Supported Architectures an
d Languages</a></p> |
24 <ul class="small-gap"> | 24 <ul class="small-gap"> |
25 <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> | 25 <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> |
26 <li><a class="reference internal" href="#what-are-the-supported-instruction-set-
architectures" id="id15">What are the supported instruction set architectures?</
a></li> | 26 <li><a class="reference internal" href="#what-are-the-supported-instruction-set-
architectures" id="id13">What are the supported instruction set architectures?</
a></li> |
27 <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> | 27 <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> |
28 <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 browse
rs?</a></li> | 28 <li><a class="reference internal" href="#do-you-only-support-chrome-what-about-o
ther-browsers" id="id15">Do you only support Chrome? What about other browsers?<
/a></li> |
29 <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
> | 29 <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
> |
30 <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> | 30 <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> |
31 <li><a class="reference internal" href="#does-native-client-support-simd-vector-
instructions" id="id20">Does Native Client support SIMD vector instructions?</a>
</li> | 31 <li><a class="reference internal" href="#does-native-client-support-simd-vector-
instructions" id="id18">Does Native Client support SIMD vector instructions?</a>
</li> |
32 <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> | 32 <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> |
33 <li><a class="reference internal" href="#does-native-client-support-concurrency-
parallelism" id="id22">Does Native Client support concurrency/parallelism?</a></
li> | 33 <li><a class="reference internal" href="#does-native-client-support-concurrency-
parallelism" id="id20">Does Native Client support concurrency/parallelism?</a></
li> |
34 </ul> | 34 </ul> |
35 </li> | 35 </li> |
36 <li><p class="first"><a class="reference internal" href="#coming-soon" id="id23"
>Coming Soon</a></p> | 36 <li><p class="first"><a class="reference internal" href="#coming-soon" id="id21"
>Coming Soon</a></p> |
37 <ul class="small-gap"> | 37 <ul class="small-gap"> |
38 <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 de
vices?</a></li> | 38 <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 de
vices?</a></li> |
39 </ul> | 39 </ul> |
40 </li> | 40 </li> |
41 <li><p class="first"><a class="reference internal" href="#security-and-privacy"
id="id25">Security and Privacy</a></p> | 41 <li><p class="first"><a class="reference internal" href="#security-and-privacy"
id="id23">Security and Privacy</a></p> |
42 <ul class="small-gap"> | 42 <ul class="small-gap"> |
43 <li><a class="reference internal" href="#what-happens-to-my-data-when-i-use-nati
ve-client" id="id26">What happens to my data when I use Native Client?</a></li> | 43 <li><a class="reference internal" href="#what-happens-to-my-data-when-i-use-nati
ve-client" id="id24">What happens to my data when I use Native Client?</a></li> |
44 <li><a class="reference internal" href="#how-does-native-client-prevent-sandboxe
d-code-from-doing-bad-things" id="id27">How does Native Client prevent sandboxed
code from doing Bad Things?</a></li> | 44 <li><a class="reference internal" href="#how-does-native-client-prevent-sandboxe
d-code-from-doing-bad-things" id="id25">How does Native Client prevent sandboxed
code from doing Bad Things?</a></li> |
45 <li><a class="reference internal" href="#how-does-google-know-that-the-safety-me
asures-in-native-client-are-sufficient" id="id28">How does Google know that the
safety measures in Native Client are sufficient?</a></li> | 45 <li><a class="reference internal" href="#how-does-google-know-that-the-safety-me
asures-in-native-client-are-sufficient" id="id26">How does Google know that the
safety measures in Native Client are sufficient?</a></li> |
46 </ul> | 46 </ul> |
47 </li> | 47 </li> |
48 <li><p class="first"><a class="reference internal" href="#development" id="id29"
>Development</a></p> | 48 <li><p class="first"><a class="reference internal" href="#development" id="id27"
>Development</a></p> |
49 <ul class="small-gap"> | 49 <ul class="small-gap"> |
50 <li><a class="reference internal" href="#how-do-i-debug" id="id30">How do I debu
g?</a></li> | 50 <li><a class="reference internal" href="#how-do-i-debug" id="id28">How do I debu
g?</a></li> |
51 <li><a class="reference internal" href="#how-do-i-build-x86-32-x86-64-or-arm-nex
es" id="id31">How do I build x86-32, x86-64 or ARM <code>.nexes</code>?</a></li> | 51 <li><a class="reference internal" href="#how-do-i-build-x86-32-x86-64-or-arm-nex
es" id="id29">How do I build x86-32, x86-64 or ARM <code>.nexes</code>?</a></li> |
52 <li><a class="reference internal" href="#how-can-my-web-application-determine-wh
ich-nexe-to-load" id="id32">How can my web application determine which <code>.ne
xe</code> to load?</a></li> | 52 <li><a class="reference internal" href="#how-can-my-web-application-determine-wh
ich-nexe-to-load" id="id30">How can my web application determine which <code>.ne
xe</code> to load?</a></li> |
53 <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 Clie
nt module with just plain C (not C++)?</a></li> | 53 <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 Clie
nt module with just plain C (not C++)?</a></li> |
54 <li><a class="reference internal" href="#what-unix-system-calls-can-i-make-throu
gh-native-client" id="id34">What UNIX system calls can I make through Native Cli
ent?</a></li> | 54 <li><a class="reference internal" href="#what-unix-system-calls-can-i-make-throu
gh-native-client" id="id32">What UNIX system calls can I make through Native Cli
ent?</a></li> |
55 <li><a class="reference internal" href="#is-my-favorite-third-party-library-avai
lable-for-native-client" id="id35">Is my favorite third-party library available
for Native Client?</a></li> | 55 <li><a class="reference internal" href="#is-my-favorite-third-party-library-avai
lable-for-native-client" id="id33">Is my favorite third-party library available
for Native Client?</a></li> |
56 <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> | 56 <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> |
57 </ul> | 57 </ul> |
58 </li> | 58 </li> |
59 <li><p class="first"><a class="reference internal" href="#portability" id="id37"
>Portability</a></p> | 59 <li><p class="first"><a class="reference internal" href="#portability" id="id35"
>Portability</a></p> |
60 <ul class="small-gap"> | 60 <ul class="small-gap"> |
61 <li><a class="reference internal" href="#do-i-have-to-do-anything-special-to-mak
e-my-application-run-on-different-operating-systems" id="id38">Do I have to do a
nything special to make my application run on different operating systems?</a></
li> | 61 <li><a class="reference internal" href="#do-i-have-to-do-anything-special-to-mak
e-my-application-run-on-different-operating-systems" id="id36">Do I have to do a
nything special to make my application run on different operating systems?</a></
li> |
62 <li><a class="reference internal" href="#how-easy-is-it-to-port-my-existing-nati
ve-code-to-native-client" id="id39">How easy is it to port my existing native co
de to Native Client?</a></li> | 62 <li><a class="reference internal" href="#how-easy-is-it-to-port-my-existing-nati
ve-code-to-native-client" id="id37">How easy is it to port my existing native co
de to Native Client?</a></li> |
63 </ul> | 63 </ul> |
64 </li> | 64 </li> |
65 <li><p class="first"><a class="reference internal" href="#troubleshooting" id="i
d40">Troubleshooting</a></p> | 65 <li><p class="first"><a class="reference internal" href="#troubleshooting" id="i
d38">Troubleshooting</a></p> |
66 <ul class="small-gap"> | 66 <ul class="small-gap"> |
67 <li><a class="reference internal" href="#my-pexe-isn-t-loading-help" id="id41">M
y <code>.pexe</code> isn’t loading, help!</a></li> | 67 <li><a class="reference internal" href="#my-pexe-isn-t-loading-help" id="id39">M
y <code>.pexe</code> isn’t loading, help!</a></li> |
68 <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> | 68 <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> |
69 </ul> | 69 </ul> |
70 </li> | 70 </li> |
71 </ul> | 71 </ul> |
72 | 72 |
73 </div><p>This document answers some frequently asked questions about Native | 73 </div><p>This document answers some frequently asked questions about Native |
74 Client (NaCl) and Portable Native Client (PNaCl, pronounced | 74 Client (NaCl) and Portable Native Client (PNaCl, pronounced |
75 “pinnacle”). For a high-level overview of Native Client, see the | 75 “pinnacle”). For a high-level overview of Native Client, see the |
76 <a class="reference internal" href="/native-client/overview.html"><em>Technical
Overview</em></a>.</p> | 76 <a class="reference internal" href="/native-client/overview.html"><em>Technical
Overview</em></a>.</p> |
77 <p>If you have questions that aren’t covered in this FAQ:</p> | 77 <p>If you have questions that aren’t covered in this FAQ:</p> |
78 <ul class="small-gap"> | 78 <ul class="small-gap"> |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 already-released applications.</li> | 118 already-released applications.</li> |
119 <li><strong>Convenience:</strong> Developers only need to ship a single <code>.p
exe</code> file, | 119 <li><strong>Convenience:</strong> Developers only need to ship a single <code>.p
exe</code> file, |
120 not one <code>.nexe</code> file per supported architecture.</li> | 120 not one <code>.nexe</code> file per supported architecture.</li> |
121 <li><strong>Portability:</strong> Developers and users don’t need to worry
about | 121 <li><strong>Portability:</strong> Developers and users don’t need to worry
about |
122 already-released applications not working on new hardware: PNaCl | 122 already-released applications not working on new hardware: PNaCl |
123 already supports all architectures NaCl does, and as PNaCl evolves it | 123 already supports all architectures NaCl does, and as PNaCl evolves it |
124 gains support for new processors and fully uses their capabilities.</li> | 124 gains support for new processors and fully uses their capabilities.</li> |
125 </ul> | 125 </ul> |
126 <p>For more details, refer to the <a class="reference internal" href="/native-cl
ient/nacl-and-pnacl.html"><em>history behind and comparison of | 126 <p>For more details, refer to the <a class="reference internal" href="/native-cl
ient/nacl-and-pnacl.html"><em>history behind and comparison of |
127 NaCl and PNaCl</em></a>.</p> | 127 NaCl and PNaCl</em></a>.</p> |
128 </section><section id="when-should-i-use-native-client"> | 128 </section><section id="when-should-i-use-portable-native-client-instead-of-nativ
e-client"> |
129 <h3 id="when-should-i-use-native-client">When should I use Native Client?</h3> | 129 <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> |
| 130 <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 |
| 131 Web platform delivered by Chrome whereas NaCl only works on the Chrome Web |
| 132 Store.</p> |
| 133 </section><section id="when-should-i-use-portable-native-client-native-client"> |
| 134 <h3 id="when-should-i-use-portable-native-client-native-client">When should I us
e Portable Native Client / Native Client?</h3> |
130 <p>The following are some typical use cases. For details, see the | 135 <p>The following are some typical use cases. For details, see the |
131 <a class="reference internal" href="/native-client/overview.html"><em>Technical
Overview</em></a>.</p> | 136 <a class="reference internal" href="/native-client/overview.html"><em>Technical
Overview</em></a>.</p> |
132 <ul class="small-gap"> | 137 <ul class="small-gap"> |
133 <li>Porting existing software components for use in a web application.</li> | 138 <li>Porting existing applications or software components, written in C/C++ or |
134 <li>Porting legacy desktop applications.</li> | 139 virtual machines written in C/C++, for use in a web application.</li> |
135 <li>Handling browser-side encryption and decryption for an enterprise | 140 <li><p class="first">Using compute-intensive applications, including threads and
SIMD, such as:</p> |
136 application.</li> | 141 <ul class="small-gap"> |
| 142 <li>Scientific computing.</li> |
137 <li>Handling multimedia for a web application.</li> | 143 <li>Handling multimedia for a web application.</li> |
138 <li>Handling various aspects of web-based games, including physics engines | 144 <li>Various aspects of web-based games, including physics engines and AI.</li> |
139 and AI.</li> | |
140 </ul> | 145 </ul> |
141 <p>Native Client is a versatile technology; we expect that it will also be | 146 </li> |
| 147 <li>Running untrusted code on a server or within an application (such as a plugi
n |
| 148 system for a game).</li> |
| 149 </ul> |
| 150 <p>Portable Native Client and Native Client are versatile technologies which are |
142 used in many other contexts outside of Chrome.</p> | 151 used in many other contexts outside of Chrome.</p> |
143 </section><section id="when-should-i-use-portable-native-client"> | |
144 <h3 id="when-should-i-use-portable-native-client">When should I use Portable Nat
ive Client?</h3> | |
145 <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 | |
146 open web whereas NaCl only works on the Chrome Web Store.</p> | |
147 </section><section id="how-fast-does-code-run-in-portable-native-client"> | 152 </section><section id="how-fast-does-code-run-in-portable-native-client"> |
148 <h3 id="how-fast-does-code-run-in-portable-native-client">How fast does code run
in Portable Native Client?</h3> | 153 <h3 id="how-fast-does-code-run-in-portable-native-client">How fast does code run
in Portable Native Client?</h3> |
149 <p>Fast! The SPEC2k benchmarks (C, C++ and floating-point benchmarks) give | 154 <p>Fast! The SPEC2k benchmarks (C, C++ and floating-point benchmarks) give |
150 the following overhead for optimized PNaCl compared to regular optimized | 155 the following overhead for optimized PNaCl compared to regular optimized |
151 LLVM:</p> | 156 LLVM:</p> |
152 <table border="1" class="docutils"> | 157 <table border="1" class="docutils"> |
153 <colgroup> | 158 <colgroup> |
154 </colgroup> | 159 </colgroup> |
155 <tbody valign="top"> | 160 <tbody valign="top"> |
156 <tr class="row-odd"><td>x86-32</td> | 161 <tr class="row-odd"><td>x86-32</td> |
157 <td>15%</td> | 162 <td>15%</td> |
158 </tr> | 163 </tr> |
159 <tr class="row-even"><td>x86-64</td> | 164 <tr class="row-even"><td>x86-64</td> |
160 <td>25%</td> | 165 <td>25%</td> |
161 </tr> | 166 </tr> |
162 <tr class="row-odd"><td>ARM</td> | 167 <tr class="row-odd"><td>ARM</td> |
163 <td>10%</td> | 168 <td>10%</td> |
164 </tr> | 169 </tr> |
165 </tbody> | 170 </tbody> |
166 </table> | 171 </table> |
167 <p>Note that benchmark performance is sometimes bimodal, so different use | 172 <p>Note that benchmark performance is sometimes bimodal, so different use |
168 cases are likely to achieve better or worse performance than the above | 173 cases are likely to achieve better or worse performance than the above |
169 averages. For example floating-point heavy code usually exhibits much | 174 averages. For example floating-point heavy code usually exhibits much |
170 lower overheads whereas very branch-heavy code often performs worse.</p> | 175 lower overheads whereas very branch-heavy code often performs worse.</p> |
171 <p>Note that PNaCl supports performance features that are often used in | 176 <p>Note that PNaCl supports performance features that are often used in |
172 native code such as <a class="reference internal" href="/native-client/reference
/pnacl-c-cpp-language-support.html#language-support-threading"><em>threading</em
></a> and | 177 native code such as <a class="reference internal" href="/native-client/reference
/pnacl-c-cpp-language-support.html#language-support-threading"><em>threading</em
></a> and |
173 <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-languag
e-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</p> | 178 <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-languag
e-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</p> |
174 <p>For details, see:</p> | 179 <p>For details, see:</p> |
175 <ul class="small-gap"> | 180 <ul class="small-gap"> |
| 181 <li><a class="reference external" href="https://www.youtube.com/watch?v=675znN6t
ntw&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_">PNaCl SIMD: Speed on the Web</a
>.</li> |
176 <li><a class="reference external" href="https://nativeclient.googlecode.com/svn/
data/site/NaCl_SFI.pdf">Adapting Software Fault Isolation to Contemporary CPU Ar
chitectures</a> (PDF).</li> | 182 <li><a class="reference external" href="https://nativeclient.googlecode.com/svn/
data/site/NaCl_SFI.pdf">Adapting Software Fault Isolation to Contemporary CPU Ar
chitectures</a> (PDF).</li> |
177 <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> | 183 <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> |
178 </ul> | 184 </ul> |
179 <p>If your code isn’t performing as close to native speed as you’d e
xpect, | 185 <p>If your code isn’t performing as close to native speed as you’d e
xpect, |
180 <a class="reference internal" href="/native-client/help.html"><em>let us know</e
m></a>!</p> | 186 <a class="reference internal" href="/native-client/help.html"><em>let us know</e
m></a>!</p> |
181 </section><section id="why-use-portable-native-client-instead-of-technology-x"> | 187 </section><section id="why-use-portable-native-client-instead-of-technology-x"> |
182 <h3 id="why-use-portable-native-client-instead-of-technology-x">Why use Portable
Native Client instead of <em><technology X></em>?</h3> | 188 <h3 id="why-use-portable-native-client-instead-of-technology-x">Why use Portable
Native Client instead of <em><technology X></em>?</h3> |
183 <p>Many other technologies can be compared to Portable Native Client: | 189 <p>Many other technologies can be compared to Portable Native Client: |
184 Flash, Java, Silverlight, ActiveX, .NET, asm.js, etc...</p> | 190 Flash, Java, Silverlight, ActiveX, .NET, asm.js, etc...</p> |
185 <p>Different technologies have different strengths and weaknesses. In | 191 <p>Different technologies have different strengths and weaknesses. In |
186 appropriate contexts, Portable Native Client can be faster, more secure, | 192 appropriate contexts, Portable Native Client can be faster, more secure, |
187 and/or more compatible across operating systems and architectures than | 193 and/or more compatible across operating systems and architectures than |
188 other technologies.</p> | 194 other technologies.</p> |
189 <p>Portable Native Client complement other technologies by giving web | 195 <p>Portable Native Client complement other technologies by giving web |
190 developers a new capability: the ability to run fast, secure native code | 196 developers a new capability: the ability to run fast, secure native code |
191 from a web browser in an architecture-independent way.</p> | 197 from a web browser in an architecture-independent way.</p> |
192 </section><section id="if-i-want-direct-access-to-the-os-should-i-use-native-cli
ent"> | 198 </section><section id="if-i-want-direct-access-to-the-os-should-i-use-native-cli
ent"> |
193 <h3 id="if-i-want-direct-access-to-the-os-should-i-use-native-client">If I want
direct access to the OS, should I use Native Client?</h3> | 199 <h3 id="if-i-want-direct-access-to-the-os-should-i-use-native-client">If I want
direct access to the OS, should I use Native Client?</h3> |
194 <p>No—Native Client does not provide direct access to the OS or devices, | 200 <p>No—Native Client does not provide direct access to the OS or devices, |
195 or otherwise bypass the JavaScript security model. For more information, | 201 or otherwise bypass the JavaScript security model. For more information, |
196 see later sections of this FAQ.</p> | 202 see later sections of this FAQ.</p> |
197 </section></section><section id="development-environments-and-tools"> | 203 </section></section><section id="development-environments-and-tools"> |
198 <h2 id="development-environments-and-tools">Development Environments and Tools</
h2> | 204 <h2 id="development-environments-and-tools">Development Environments and Tools</
h2> |
199 <section id="what-development-environment-and-development-operating-system-do-yo
u-recommend"> | 205 <section id="what-development-environment-and-development-operating-system-do-yo
u-recommend"> |
200 <h3 id="what-development-environment-and-development-operating-system-do-you-rec
ommend">What development environment and development operating system do you rec
ommend?</h3> | 206 <h3 id="what-development-environment-and-development-operating-system-do-you-rec
ommend">What development environment and development operating system do you rec
ommend?</h3> |
201 <p>You can develop on Windows, Mac, or Linux, and the resulting Native | 207 <p>You can develop on Windows, Mac, or Linux, and the resulting Native Client or |
202 Client or Portable Native Client application will run inside the Google | 208 Portable Native Client application will run inside the Google Chrome browser on |
203 Chrome browser on all those platforms as well as ChromeOS. You can also | 209 all those platforms as well as ChromeOS. You can also develop on ChromeOS with |
204 develop on ChromeOS with <a class="reference external" href="https://github.com/
dnschneid/crouton">Crouton</a>, and we’re working on | 210 <a class="reference external" href="https://github.com/dnschneid/crouton">Crouto
n</a> or our <a class="reference external" href="https://www.youtube.com/watch?v
=OzNuzBDEWzk&list=PLOU2XLYxmsIIwGK7v7jg3gQvIAWJzdat_">experimental developme
nt environment which runs within NaCl</a>, |
205 self-hosting a full development environment on Portable Native Client.</p> | 211 and we’re working on self-hosting a full development environment on Portab
le |
| 212 Native Client.</p> |
206 <p>Any editor+shell combination should work as well as IDEs like Eclipse, | 213 <p>Any editor+shell combination should work as well as IDEs like Eclipse, |
207 Visual Studio with the <a class="reference internal" href="/native-client/devgui
de/devcycle/vs-addin.html"><em>Native Client Add-In</em></a> on Windows, or Xcod
e on Mac OSX.</p> | 214 Visual Studio with the <a class="reference internal" href="/native-client/devgui
de/devcycle/vs-addin.html"><em>Native Client Add-In</em></a> on Windows, or Xcod
e on Mac OSX.</p> |
208 </section><section id="i-m-not-familiar-with-native-development-tools-can-i-stil
l-use-the-native-client-sdk"> | 215 </section><section id="i-m-not-familiar-with-native-development-tools-can-i-stil
l-use-the-native-client-sdk"> |
209 <h3 id="i-m-not-familiar-with-native-development-tools-can-i-still-use-the-nativ
e-client-sdk">I’m not familiar with native development tools, can I still
use the Native Client SDK?</h3> | 216 <h3 id="i-m-not-familiar-with-native-development-tools-can-i-still-use-the-nativ
e-client-sdk">I’m not familiar with native development tools, can I still
use the Native Client SDK?</h3> |
210 <p>You may find our <a class="reference internal" href="/native-client/devguide/
tutorial/index.html"><em>Tutorial</em></a> and <a class="reference internal" hre
f="/native-client/devguide/devcycle/building.html"><em>Building | 217 <p>You may find our <a class="reference internal" href="/native-client/devguide/
tutorial/index.html"><em>Tutorial</em></a> and <a class="reference internal" hre
f="/native-client/devguide/devcycle/building.html"><em>Building |
211 instructions</em></a> useful, and you can look at | 218 instructions</em></a> useful, and you can look at |
212 the code and Makefiles for the SDK examples to understand how the | 219 the code and Makefiles for the SDK examples to understand how the |
213 examples are built and run.</p> | 220 examples are built and run.</p> |
214 <p>You’ll need to learn how to use some tools (like GCC, LLVM, make, | 221 <p>You’ll need to learn how to use some tools (like GCC, LLVM, make, Eclip
se, |
215 Eclipse, Visual Studio, or Xcode) before you can get very far with the | 222 Visual Studio, or Xcode) before you can get very far with the SDK. Try seaching |
216 SDK. Try seaching for an <a class="reference external" href="https://www.google.
com/search?q=gcc+introduction">introduction to GCC</a>.</p> | 223 for an <a class="reference external" href="https://www.google.com/search?q=gcc+i
ntroduction">introduction to GCC</a>.</p> |
217 </section></section><section id="openness-and-supported-architectures-and-langua
ges"> | 224 </section></section><section id="openness-and-supported-architectures-and-langua
ges"> |
218 <h2 id="openness-and-supported-architectures-and-languages">Openness, and Suppor
ted Architectures and Languages</h2> | 225 <h2 id="openness-and-supported-architectures-and-languages">Openness, and Suppor
ted Architectures and Languages</h2> |
219 <section id="is-native-client-open-is-it-a-standard"> | 226 <section id="is-native-client-open-is-it-a-standard"> |
220 <h3 id="is-native-client-open-is-it-a-standard">Is Native Client open? Is it a s
tandard?</h3> | 227 <h3 id="is-native-client-open-is-it-a-standard">Is Native Client open? Is it a s
tandard?</h3> |
221 <p>Native Client is completely open: the executable format is open and the | 228 <p>Native Client is completely open: the executable format is open and the |
222 <a class="reference external" href="nacl_project_">source code is open</a>. Righ
t | 229 <a class="reference external" href="nacl_project_">source code is open</a>. Righ
t |
223 now the Native Client project is in its early stages, so it’s premature | 230 now the Native Client project is in its early stages, so it’s premature |
224 to consider Native Client for standardization.</p> | 231 to consider Native Client for standardization.</p> |
225 <p>We consistenly try to document our design and implementation and hope to | 232 <p>We consistenly try to document our design and implementation and hope to |
226 standardize Portable Native Client when it gains more traction. A good | 233 standardize Portable Native Client when it gains more traction. A good |
(...skipping 10 matching lines...) Expand all Loading... |
237 Portable Native Client but is only supported on the Chrome Web | 244 Portable Native Client but is only supported on the Chrome Web |
238 Store. Native Client’s <code>.nexe</code> files are architecture-dependent
and | 245 Store. Native Client’s <code>.nexe</code> files are architecture-dependent
and |
239 cannot adapt to new architectures without recompilation, we therefore | 246 cannot adapt to new architectures without recompilation, we therefore |
240 deem them better suited to a web store than to the open web.</p> | 247 deem them better suited to a web store than to the open web.</p> |
241 <p>With Portable Native Client we deliver a system that has comparable | 248 <p>With Portable Native Client we deliver a system that has comparable |
242 portability to JavaScript and can adapt to new instruction set | 249 portability to JavaScript and can adapt to new instruction set |
243 architectures without requiring recompilation. The web is better when | 250 architectures without requiring recompilation. The web is better when |
244 it’s platform-independent, and we’d like it to stay that way.</p> | 251 it’s platform-independent, and we’d like it to stay that way.</p> |
245 </section><section id="do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-la
nguage"> | 252 </section><section id="do-i-have-to-use-c-or-c-i-d-really-like-to-use-another-la
nguage"> |
246 <span id="other-languages"></span><h3 id="do-i-have-to-use-c-or-c-i-d-really-lik
e-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> | 253 <span id="other-languages"></span><h3 id="do-i-have-to-use-c-or-c-i-d-really-lik
e-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> |
247 <p>Right now only C and C++ are supported directly by the toolchain in the | 254 <p>Right now only C and C++ are supported directly by the toolchain in the SDK.
C# |
248 SDK. C# and other languages in the .NET family are supported via the | 255 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 |
249 <a class="reference external" href="https://github.com/elijahtaylor/mono">Mono p
ort</a> for Native | 256 Native Client. Moreover, there are several ongoing projects to support |
250 Client. Moreover, there are several ongoing projects to support | 257 additional language runtimes (e.g. <a class="reference external" href="https://c
ode.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools">n
aclports supports Lua, Python and Ruby</a>) |
251 additional language runtimes (e.g. <a class="reference external" href="https://c
ode.google.com/p/naclports/source/browse#svn%2Ftrunk%2Fsrc%2Fexamples%2Ftools">n
aclports supports Lua, Python and | 258 as well as to compile more languages to LLVM’s intermediate representation |
252 Ruby</a>) | 259 (e.g. support <a class="reference external" href="http://halide-lang.org/">Halid
e</a>, Haskell with <a class="reference external" href="http://www.haskell.org/g
hc/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 |
253 as well as to compile more languages to LLVM’s intermediate | |
254 representation (e.g. support Haskell with <a class="reference external" href="ht
tp://www.haskell.org/ghc/docs/latest/html/users_guide/code-generators.html">GHC<
/a> | |
255 or support Fortran with <a class="reference external" href="https://flang-gsoc.b
logspot.ie/2013/09/end-of-gsoc-report.html">flang</a>), or | |
256 transpile languages to C/C++ (source-to-source compilation).</p> | 260 transpile languages to C/C++ (source-to-source compilation).</p> |
257 <p>If you’re interested in getting other languages working, please contact
the | 261 <p>If you’re interested in getting other languages working, please contact
the |
258 Native Client team by way of the <a class="reference external" href="https://gro
ups.google.com/group/native-client-discuss">native-client-discuss mailing list</
a>.</p> | 262 Native Client team by way of the <a class="reference external" href="https://gro
ups.google.com/group/native-client-discuss">native-client-discuss</a> mailing li
st.</p> |
259 </section><section id="will-you-only-support-chrome-what-about-other-browsers"> | 263 </section><section id="do-you-only-support-chrome-what-about-other-browsers"> |
260 <h3 id="will-you-only-support-chrome-what-about-other-browsers">Will you only su
pport Chrome? What about other browsers?</h3> | 264 <h3 id="do-you-only-support-chrome-what-about-other-browsers">Do you only suppor
t Chrome? What about other browsers?</h3> |
261 <p>We aim to support multiple browsers. However, a number of features that | 265 <p>We aim to support multiple browsers. However, a number of features that |
262 we consider requirements for a production-quality system that keeps the | 266 we consider requirements for a production-quality system that keeps the |
263 user safe are difficult to implement without help from the | 267 user safe are difficult to implement without help from the |
264 browser. Specific examples are an out-of-process plugin architecture and | 268 browser. Specific examples are an out-of-process plugin architecture and |
265 appropriate interfaces for integrated 3D graphics. We have worked | 269 appropriate interfaces for integrated 3D graphics. We have worked |
266 closely with Chromium developers to deliver these features and we are | 270 closely with Chromium developers to deliver these features and we are |
267 eager to collaborate with developers from other browsers.</p> | 271 eager to collaborate with developers from other browsers.</p> |
268 </section><section id="what-s-the-difference-between-npapi-and-pepper"> | 272 </section><section id="what-s-the-difference-between-npapi-and-pepper"> |
269 <h3 id="what-s-the-difference-between-npapi-and-pepper">What’s the differe
nce between NPAPI and Pepper?</h3> | 273 <h3 id="what-s-the-difference-between-npapi-and-pepper">What’s the differe
nce between NPAPI and Pepper?</h3> |
270 <p><a class="reference internal" href="/native-client/pepper_stable/index.html">
<em>Pepper</em></a> (also known as PPAPI) is a new API that | 274 <p><a class="reference internal" href="/native-client/pepper_stable/index.html">
<em>Pepper</em></a> (also known as PPAPI) is a new API that |
271 lets Native Client modules communicate with the browser. Pepper supports | 275 lets Native Client modules communicate with the browser. Pepper supports |
272 various features that don’t have robust support in NPAPI, such as event | 276 various features that don’t have robust support in NPAPI, such as event |
273 handling, out-of-process plugins, and asynchronous interfaces. Native | 277 handling, out-of-process plugins, and asynchronous interfaces. Native |
274 Client has transitioned from using NPAPI to using Pepper.</p> | 278 Client has transitioned from using NPAPI to using Pepper.</p> |
275 </section><section id="is-npapi-part-of-the-native-client-sdk"> | 279 </section><section id="is-npapi-part-of-the-native-client-sdk"> |
276 <h3 id="is-npapi-part-of-the-native-client-sdk">Is NPAPI part of the Native Clie
nt SDK?</h3> | 280 <h3 id="is-npapi-part-of-the-native-client-sdk">Is NPAPI part of the Native Clie
nt SDK?</h3> |
277 <p>NPAPI is not supported by the Native Client SDK, and is <a class="reference e
xternal" href="http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend
-npapi.html">deprecated in | 281 <p>NPAPI is not supported by the Native Client SDK, and is <a class="reference e
xternal" href="http://blog.chromium.org/2013/09/saying-goodbye-to-our-old-friend
-npapi.html">deprecated in Chrome</a>.</p> |
278 Chrome</a>.</p> | |
279 </section><section id="does-native-client-support-simd-vector-instructions"> | 282 </section><section id="does-native-client-support-simd-vector-instructions"> |
280 <h3 id="does-native-client-support-simd-vector-instructions">Does Native Client
support SIMD vector instructions?</h3> | 283 <h3 id="does-native-client-support-simd-vector-instructions">Does Native Client
support SIMD vector instructions?</h3> |
281 <p>Native Client currently supports SSE on x86 and NEON on ARM. Support for | 284 <p>Native Client currently supports SSE on x86 and NEON on ARM. Support for |
282 AVX on x86 is under way.</p> | 285 AVX on x86 is under way.</p> |
283 <p>Portable Native Client supports portable SIMD vectors, as detailed in | 286 <p>Portable Native Client supports portable SIMD vectors, as detailed in |
284 <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-languag
e-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</p> | 287 <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-languag
e-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>.</p> |
285 </section><section id="can-i-use-native-client-for-3d-graphics"> | 288 </section><section id="can-i-use-native-client-for-3d-graphics"> |
286 <h3 id="can-i-use-native-client-for-3d-graphics">Can I use Native Client for 3D
graphics?</h3> | 289 <h3 id="can-i-use-native-client-for-3d-graphics">Can I use Native Client for 3D
graphics?</h3> |
287 <p>Yes. Native Client supports <a class="reference external" href="https://www.k
hronos.org/opengles/">OpenGL ES 2.0</a>.</p> | 290 <p>Yes. Native Client supports <a class="reference external" href="https://www.k
hronos.org/opengles/">OpenGL ES 2.0</a>.</p> |
288 <p>To alert the user regarding their hardware platform’s 3D feature set | 291 <p>To alert the user regarding their hardware platform’s 3D feature set |
289 before loading a large NaCl application, see <a class="reference internal" href=
"/native-client/devguide/coding/3D-graphics.html"><em>Vetting the driver in | 292 before loading a large NaCl application, see <a class="reference internal" href=
"/native-client/devguide/coding/3D-graphics.html"><em>Vetting the driver in |
290 Javascript</em></a>.</p> | 293 Javascript</em></a>.</p> |
291 <p>Some GL extensions are exposed to Native Client applications, see the | 294 <p>Some GL extensions are exposed to Native Client applications, see the <a clas
s="reference external" href="https://code.google.com/p/chromium/codesearch#chrom
ium/src/ppapi/lib/gl/gles2/gles2.c">GLES2 |
292 <a class="reference external" href="https://src.chromium.org/viewvc/chrome/trunk
/src/ppapi/lib/gl/gles2/gles2.c">GLES2 file</a>. | 295 file</a>. This file is part of the GL wrapper supplied by the library |
293 This file is part of the GL wrapper supplied by the library | 296 <code>ppapi_gles2</code> which you’ll want to include in your project. In
most cases |
294 <code>ppapi_gles2</code> which you’ll want to include in your project. In
most | 297 extensions map to extensions available on other platforms, or differ very |
295 cases extensions map to extensions available on other platforms, or | 298 slightly (if they differ, the extension is usually CHROMIUM or ANGLE instead of |
296 differ very slightly (if they differ, the extension is usually CHROMIUM | 299 EXT).</p> |
297 or ANGLE instead of EXT).</p> | |
298 </section><section id="does-native-client-support-concurrency-parallelism"> | 300 </section><section id="does-native-client-support-concurrency-parallelism"> |
299 <h3 id="does-native-client-support-concurrency-parallelism">Does Native Client s
upport concurrency/parallelism?</h3> | 301 <h3 id="does-native-client-support-concurrency-parallelism">Does Native Client s
upport concurrency/parallelism?</h3> |
300 <p>Native Client and Portable Native Client both support pthreads, | 302 <p>Native Client and Portable Native Client both support pthreads, |
301 C11/C++11 threads, and low-level synchronization primitives (mutex, | 303 C11/C++11 threads, and low-level synchronization primitives (mutex, |
302 barriers, atomic read/modify/write, compare-and-exchange, etc...), thus | 304 barriers, atomic read/modify/write, compare-and-exchange, etc...), thus |
303 allowing your Native Client application to utilize several CPU cores. | 305 allowing your Native Client application to utilize several CPU cores. |
304 Note that this allows you to modify datastructures concurrently without | 306 Note that this allows you to modify datastructures concurrently without |
305 needing to copy them, which is often a limitation of shared-nothing | 307 needing to copy them, which is often a limitation of shared-nothing |
306 systems. For more information see <a class="reference internal" href="/native-cl
ient/reference/pnacl-c-cpp-language-support.html#memory-model-and-atomics"><em>m
emory model and atomics</em></a> and <a class="reference internal" href="/native
-client/reference/pnacl-c-cpp-language-support.html#language-support-threading">
<em>threading</em></a>.</p> | 308 systems. For more information see <a class="reference internal" href="/native-cl
ient/reference/pnacl-c-cpp-language-support.html#memory-model-and-atomics"><em>m
emory model and atomics</em></a> and <a class="reference internal" href="/native
-client/reference/pnacl-c-cpp-language-support.html#language-support-threading">
<em>threading</em></a>.</p> |
307 <p>Native Client doesn’t support HTML5 Web Workers directly but can | 309 <p>Native Client doesn’t support HTML5 Web Workers directly but can |
(...skipping 14 matching lines...) Expand all Loading... |
322 </section></section><section id="security-and-privacy"> | 324 </section></section><section id="security-and-privacy"> |
323 <h2 id="security-and-privacy">Security and Privacy</h2> | 325 <h2 id="security-and-privacy">Security and Privacy</h2> |
324 <section id="what-happens-to-my-data-when-i-use-native-client"> | 326 <section id="what-happens-to-my-data-when-i-use-native-client"> |
325 <h3 id="what-happens-to-my-data-when-i-use-native-client">What happens to my dat
a when I use Native Client?</h3> | 327 <h3 id="what-happens-to-my-data-when-i-use-native-client">What happens to my dat
a when I use Native Client?</h3> |
326 <p>Users can opt-in to sending usage statistics and crash information in | 328 <p>Users can opt-in to sending usage statistics and crash information in |
327 Chrome, which includes usage statistics and crash information about | 329 Chrome, which includes usage statistics and crash information about |
328 Native Client. Crashes in your code won’t otherwise send your | 330 Native Client. Crashes in your code won’t otherwise send your |
329 information to Google: Google counts the number of such crashes, but | 331 information to Google: Google counts the number of such crashes, but |
330 does so anonymously without sending your application’s data or its debug | 332 does so anonymously without sending your application’s data or its debug |
331 information.</p> | 333 information.</p> |
332 <p>For additional information about privacy and Chrome, see the <a class="refere
nce external" href="https://www.google.com/chrome/intl/en/privacy.html">Google | 334 <p>For additional information about privacy and Chrome, see the <a class="refere
nce external" href="https://www.google.com/chrome/intl/en/privacy.html">Google C
hrome |
333 Chrome privacy policy</a> and the <a class="reference external" href="https://ww
w.google.com/chrome/intl/en/eula_text.html">Google | 335 privacy policy</a> and the <a class="reference external" href="https://www.googl
e.com/chrome/intl/en/eula_text.html">Google Chrome Terms of Service</a>.</p> |
334 Chrome Terms of Service</a>.</p> | |
335 </section><section id="how-does-native-client-prevent-sandboxed-code-from-doing-
bad-things"> | 336 </section><section id="how-does-native-client-prevent-sandboxed-code-from-doing-
bad-things"> |
336 <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> | 337 <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> |
337 <p>Native Client’s sandbox works by validating the untrusted code (the | 338 <p>Native Client’s sandbox works by validating the untrusted code (the |
338 compiled Native Client module) before running it. The validator checks | 339 compiled Native Client module) before running it. The validator checks |
339 the following:</p> | 340 the following:</p> |
340 <ul class="small-gap"> | 341 <ul class="small-gap"> |
341 <li><strong>Data integrity:</strong> No loads or stores are permitted outside of
the | 342 <li><strong>Data integrity:</strong> No loads or stores are permitted outside of
the |
342 data sandbox. In particular this means that once loaded into memory, | 343 data sandbox. In particular this means that once loaded into memory, |
343 the binary is not writable. This is enforced by operating system | 344 the binary is not writable. This is enforced by operating system |
344 protection mechanisms. While new instructions can be inserted at | 345 protection mechanisms. While new instructions can be inserted at |
345 runtime to support things like JIT compilers, such instructions will | 346 runtime to support things like JIT compilers, such instructions will |
346 be subject to runtime verification according to the following | 347 be subject to runtime verification according to the following |
347 constraints before they are executed.</li> | 348 constraints before they are executed.</li> |
348 <li><strong>No unsafe instructions:</strong> The validator ensures that the Nati
ve | 349 <li><strong>No unsafe instructions:</strong> The validator ensures that the Nati
ve |
349 Client application does not contain any unsafe instructions. Examples | 350 Client application does not contain any unsafe instructions. Examples |
350 of unsafe instructions are <code>syscall</code>, <code>int</code>, and <code>lds
</code>.</li> | 351 of unsafe instructions are <code>syscall</code>, <code>int</code>, and <code>lds
</code>.</li> |
351 <li><strong>Control flow integrity:</strong> The validator ensures that all dire
ct and | 352 <li><strong>Control flow integrity:</strong> The validator ensures that all dire
ct and |
352 indirect branches target a safe instruction.</li> | 353 indirect branches target a safe instruction.</li> |
353 </ul> | 354 </ul> |
354 <p>The beauty of the Native Client sandbox is in reducing “safe” cod
e to a | 355 <p>The beauty of the Native Client sandbox is in reducing “safe” cod
e to a |
355 few simple rules that can be verified by a small trusted validator: the | 356 few simple rules that can be verified by a small trusted validator: the |
356 compiler isn’t trusted. The same applies to Portable Native Client where | 357 compiler isn’t trusted. The same applies to Portable Native Client where |
357 even the <code>.pexe</code> to <code>.nexe</code> translator, a simplified compi
ler | 358 even the <code>.pexe</code> to <code>.nexe</code> translator, a simplified compi
ler |
358 backend, isn’t trusted: it is validated before executing, and so is its | 359 backend, isn’t trusted: it is validated before executing, and so is its |
359 output.</p> | 360 output.</p> |
360 <p>In addition to static analysis of untrusted code, the Native Client | 361 <p>In addition to static analysis of untrusted code, the Native Client runtime a
lso |
361 runtime also includes an outer sandbox that mediates system calls. For | 362 includes an outer sandbox that mediates system calls. For more details about |
362 more details about both sandboxes, see <a class="reference external" href="http:
//research.google.com/pubs/pub34913.html">Native Client: A Sandbox for | 363 both sandboxes, see <a class="reference external" href="http://research.google.c
om/pubs/pub34913.html">Native Client: A Sandbox for Portable, Untrusted x86 Code
</a> |
363 Portable, Untrusted x86 Code</a> | |
364 (PDF).</p> | 364 (PDF).</p> |
365 </section><section id="how-does-google-know-that-the-safety-measures-in-native-c
lient-are-sufficient"> | 365 </section><section id="how-does-google-know-that-the-safety-measures-in-native-c
lient-are-sufficient"> |
366 <h3 id="how-does-google-know-that-the-safety-measures-in-native-client-are-suffi
cient">How does Google know that the safety measures in Native Client are suffic
ient?</h3> | 366 <h3 id="how-does-google-know-that-the-safety-measures-in-native-client-are-suffi
cient">How does Google know that the safety measures in Native Client are suffic
ient?</h3> |
367 <p>Google has taken several steps to ensure that Native Client’s security | 367 <p>Google has taken several steps to ensure that Native Client’s security
works, |
368 works, including:</p> | 368 including:</p> |
369 <ul class="small-gap"> | 369 <ul class="small-gap"> |
370 <li>Open source, peer-reviewed papers describing the design.</li> | 370 <li>Open source, peer-reviewed papers describing the design.</li> |
371 <li>A <a class="reference internal" href="/native-client/community/security-cont
est/index.html"><em>security contest</em></a>.</li> | 371 <li>A <a class="reference internal" href="/native-client/community/security-cont
est/index.html"><em>security contest</em></a>.</li> |
372 <li>Multiple internal and external security reviews.</li> | 372 <li>Multiple internal and external security reviews.</li> |
373 <li>The ongoing vigilance of our engineering and developer community.</li> | 373 <li>The ongoing vigilance of our engineering and developer community.</li> |
374 </ul> | 374 </ul> |
375 <p>Google is committed to making Native Client safer than JavaScript and | 375 <p>Google is committed to making Native Client safer than JavaScript and other |
376 other popular browser technologies. If you have suggestions for security | 376 popular browser technologies. If you have suggestions for security improvements, |
377 improvements, let the team know, by way of the <a class="reference external" hre
f="https://groups.google.com/group/native-client-discuss">native-client-discuss | 377 let the team know, by way of the <a class="reference external" href="https://gro
ups.google.com/group/native-client-discuss">native-client-discuss</a> mailing li
st.</p> |
378 mailing list</a>.</p> | |
379 </section></section><section id="development"> | 378 </section></section><section id="development"> |
380 <h2 id="development">Development</h2> | 379 <h2 id="development">Development</h2> |
381 <section id="how-do-i-debug"> | 380 <section id="how-do-i-debug"> |
382 <h3 id="how-do-i-debug">How do I debug?</h3> | 381 <h3 id="how-do-i-debug">How do I debug?</h3> |
383 <p>Instructions on <a class="reference internal" href="/native-client/sdk/exampl
es.html#debugging-the-sdk-examples"><em>debugging the SDK examples</em></a> usin
g GDB are available. You can also | 382 <p>Instructions on <a class="reference internal" href="/native-client/sdk/exampl
es.html#debugging-the-sdk-examples"><em>debugging the SDK examples</em></a> usin
g GDB are available. You can also |
384 debug Native Client modules with some <a class="reference internal" href="/nativ
e-client/devguide/devcycle/debugging.html"><em>alternative approaches</em></a>.<
/p> | 383 debug Native Client modules with some <a class="reference internal" href="/nativ
e-client/devguide/devcycle/debugging.html"><em>alternative approaches</em></a>.<
/p> |
385 </section><section id="how-do-i-build-x86-32-x86-64-or-arm-nexes"> | 384 </section><section id="how-do-i-build-x86-32-x86-64-or-arm-nexes"> |
386 <h3 id="how-do-i-build-x86-32-x86-64-or-arm-nexes">How do I build x86-32, x86-64
or ARM <code>.nexes</code>?</h3> | 385 <h3 id="how-do-i-build-x86-32-x86-64-or-arm-nexes">How do I build x86-32, x86-64
or ARM <code>.nexes</code>?</h3> |
387 <p>By default, the applications in the <code>/examples</code> folder create | 386 <p>By default, the applications in the <code>/examples</code> folder create |
388 architecture-independent <code>.pexe</code> for Portable Native Client. To | 387 architecture-independent <code>.pexe</code> for Portable Native Client. To |
(...skipping 20 matching lines...) Expand all Loading... |
409 <h3 id="what-unix-system-calls-can-i-make-through-native-client">What UNIX syste
m calls can I make through Native Client?</h3> | 408 <h3 id="what-unix-system-calls-can-i-make-through-native-client">What UNIX syste
m calls can I make through Native Client?</h3> |
410 <p>Native Client doesn’t directly expose any system calls from the host OS | 409 <p>Native Client doesn’t directly expose any system calls from the host OS |
411 because of the inherent security risks and because the resulting | 410 because of the inherent security risks and because the resulting |
412 application would not be portable across operating systems. Instead, | 411 application would not be portable across operating systems. Instead, |
413 Native Client provides portable cross-OS abstractions wrapping or | 412 Native Client provides portable cross-OS abstractions wrapping or |
414 proxying OS functionality or emulating UNIX system calls. For example, | 413 proxying OS functionality or emulating UNIX system calls. For example, |
415 Native Client provides an <code>mmap()</code> system call that behaves much like | 414 Native Client provides an <code>mmap()</code> system call that behaves much like |
416 the standard UNIX <code>mmap()</code> system call.</p> | 415 the standard UNIX <code>mmap()</code> system call.</p> |
417 </section><section id="is-my-favorite-third-party-library-available-for-native-c
lient"> | 416 </section><section id="is-my-favorite-third-party-library-available-for-native-c
lient"> |
418 <h3 id="is-my-favorite-third-party-library-available-for-native-client">Is my fa
vorite third-party library available for Native Client?</h3> | 417 <h3 id="is-my-favorite-third-party-library-available-for-native-client">Is my fa
vorite third-party library available for Native Client?</h3> |
419 <p>Google has ported several third-party libraries to Native Client; such | 418 <p>Google has ported several third-party libraries to Native Client; such librar
ies |
420 libraries are available in the <a class="reference external" href="https://code.
google.com/p/naclports">naclports</a> project. We encourage you to | 419 are available in the <a class="reference external" href="https://code.google.com
/p/naclports">naclports</a> project. We encourage you to contribute |
421 contribute libraries to naclports, and/or to host your own ported | 420 libraries to naclports, and/or to host your own ported libraries, and to let the |
422 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> | 421 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> |
423 </section><section id="do-all-the-files-in-an-application-need-to-be-served-from
-the-same-domain"> | 422 </section><section id="do-all-the-files-in-an-application-need-to-be-served-from
-the-same-domain"> |
424 <h3 id="do-all-the-files-in-an-application-need-to-be-served-from-the-same-domai
n">Do all the files in an application need to be served from the same domain?</h
3> | 423 <h3 id="do-all-the-files-in-an-application-need-to-be-served-from-the-same-domai
n">Do all the files in an application need to be served from the same domain?</h
3> |
425 <p>The <code>.nmf</code>, and <code>.nexe</code> or <code>.pexe</code> files mus
t either be served from the | 424 <p>The <code>.nmf</code>, and <code>.nexe</code> or <code>.pexe</code> files mus
t either be served from the |
426 same origin as the embedding page or an origin that has been configured | 425 same origin as the embedding page or an origin that has been configured |
427 correctly using <a class="reference external" href="http://en.wikipedia.org/wiki
/Cross-origin_resource_sharing">CORS</a>.</p> | 426 correctly using <a class="reference external" href="http://en.wikipedia.org/wiki
/Cross-origin_resource_sharing">CORS</a>.</p> |
428 <p>For applications installed from the Chrome Web Store the Web Store manifest | 427 <p>For applications installed from the Chrome Web Store the Web Store manifest |
429 must include the correct, verified domain of the embedding page.</p> | 428 must include the correct, verified domain of the embedding page.</p> |
430 </section></section><section id="portability"> | 429 </section></section><section id="portability"> |
431 <h2 id="portability">Portability</h2> | 430 <h2 id="portability">Portability</h2> |
432 <section id="do-i-have-to-do-anything-special-to-make-my-application-run-on-diff
erent-operating-systems"> | 431 <section id="do-i-have-to-do-anything-special-to-make-my-application-run-on-diff
erent-operating-systems"> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 you’re loading the correct <code>.nexe</code> file by building a separate | 511 you’re loading the correct <code>.nexe</code> file by building a separate |
513 <code>.nexe</code> for each architecture, and using a <code>.nmf</code> manifest
file to | 512 <code>.nexe</code> for each architecture, and using a <code>.nmf</code> manifest
file to |
514 let the browser select the correct <code>.nexe</code> file. Note: the need to | 513 let the browser select the correct <code>.nexe</code> file. Note: the need to |
515 select a processor-specific <code>.nexe</code> goes away with Portable Native | 514 select a processor-specific <code>.nexe</code> goes away with Portable Native |
516 Client.</li> | 515 Client.</li> |
517 <li>If things still aren’t working, <a class="reference internal" href="/n
ative-client/help.html"><em>ask for help</em></a>!</li> | 516 <li>If things still aren’t working, <a class="reference internal" href="/n
ative-client/help.html"><em>ask for help</em></a>!</li> |
518 </ul> | 517 </ul> |
519 </section></section></section> | 518 </section></section></section> |
520 | 519 |
521 {{/partials.standard_nacl_article}} | 520 {{/partials.standard_nacl_article}} |
OLD | NEW |