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="id1">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=
"id2">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-portable-native-clien
t-instead-of-native-client" id="id3">When should I use Portable Native Client in
stead of 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> |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 Client-specific tools, such as <code>pnacl-clang++</code> or <code>x86_64-nacl-g
++</code>, | 414 Client-specific tools, such as <code>pnacl-clang++</code> or <code>x86_64-nacl-g
++</code>, |
415 take care of most of the necessary changes. You may need to make some | 415 take care of most of the necessary changes. You may need to make some |
416 changes to your operating system calls and interactions with external | 416 changes to your operating system calls and interactions with external |
417 devices to work with the web. Porting existing Linux libraries is | 417 devices to work with the web. Porting existing Linux libraries is |
418 generally straightforward, with large libraries often requiring no | 418 generally straightforward, with large libraries often requiring no |
419 source change.</p> | 419 source change.</p> |
420 <p>The following kinds of code may be more challenging to port:</p> | 420 <p>The following kinds of code may be more challenging to port:</p> |
421 <ul class="small-gap"> | 421 <ul class="small-gap"> |
422 <li>Code that does direct <a class="reference external" href="pepper_stable/cpp/
classpp_1_1_t_c_p_socket">TCP</a> or | 422 <li>Code that does direct <a class="reference external" href="pepper_stable/cpp/
classpp_1_1_t_c_p_socket">TCP</a> or |
423 <a class="reference external" href="pepper_stable/cpp/classpp_1_1_u_d_p_socket">
UDP</a> networking. For security | 423 <a class="reference external" href="pepper_stable/cpp/classpp_1_1_u_d_p_socket">
UDP</a> networking. For security |
424 reasons these APIs are only available to <a class="reference external" href="/ap
ps/about_apps">packaged applications</a> after asking for the appropriate permis
sions, not on the | 424 reasons these APIs are only available to <a class="reference external" href="/ap
ps">Chrome apps</a> after asking |
425 open web. Native Client is otherwise restricted to the networking APIs | 425 for the appropriate permissions, not on the open web. Native Client is |
426 available in the browser. You may want to use to <a class="reference external" h
ref="nacl_io">nacl_io library</a> | 426 otherwise restricted to the networking APIs available in the browser. You may |
427 to use POSIX-like sockets.</li> | 427 want to use to <a class="reference external" href="nacl_io">nacl_io library</a>
to use POSIX-like sockets.</li> |
428 <li>Code that creates processes, including UNIX <code>fork</code>, won’t f
unction | 428 <li>Code that creates processes, including UNIX <code>fork</code>, won’t f
unction |
429 as-is. However, threads are supported. You can nonetheless create new | 429 as-is. However, threads are supported. You can nonetheless create new |
430 <code><embed></code> tags in your HTML page to launch new PNaCl processes.
You can even | 430 <code><embed></code> tags in your HTML page to launch new PNaCl processes.
You can even |
431 use new <code>.pexe</code> files that your existing <code>.pexe</code> saved in
a local | 431 use new <code>.pexe</code> files that your existing <code>.pexe</code> saved in
a local |
432 filesystem. This is somewhat akin to <code>execve</code>, but the process manage
ment | 432 filesystem. This is somewhat akin to <code>execve</code>, but the process manage
ment |
433 has to go through <code>postMessage</code> to JavaScript in order to create the
new | 433 has to go through <code>postMessage</code> to JavaScript in order to create the
new |
434 <code><embed></code>.</li> | 434 <code><embed></code>.</li> |
435 <li>Code that needs to do local file I/O. Native Client is restricted to accessi
ng | 435 <li>Code that needs to do local file I/O. Native Client is restricted to accessi
ng |
436 URLs and to local storage in the browser (the Pepper <a class="reference interna
l" href="/native-client/devguide/coding/file-io.html"><em>File IO API</em></a> h
as access to the same per-application storage that | 436 URLs and to local storage in the browser (the Pepper <a class="reference interna
l" href="/native-client/devguide/coding/file-io.html"><em>File IO API</em></a> h
as access to the same per-application storage that |
437 JavaScript has via Local Storage). HTML5 File System can be used, among | 437 JavaScript has via Local Storage). HTML5 File System can be used, among |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 you’re loading the correct <code>.nexe</code> file by building a separate | 485 you’re loading the correct <code>.nexe</code> file by building a separate |
486 <code>.nexe</code> for each architecture, and using a <code>.nmf</code> manifest
file to | 486 <code>.nexe</code> for each architecture, and using a <code>.nmf</code> manifest
file to |
487 let the browser select the correct <code>.nexe</code> file. Note: the need to | 487 let the browser select the correct <code>.nexe</code> file. Note: the need to |
488 select a processor-specific <code>.nexe</code> goes away with Portable Native | 488 select a processor-specific <code>.nexe</code> goes away with Portable Native |
489 Client.</li> | 489 Client.</li> |
490 <li>If things still aren’t working, <a class="reference internal" href="/n
ative-client/help.html"><em>ask for help</em></a>!</li> | 490 <li>If things still aren’t working, <a class="reference internal" href="/n
ative-client/help.html"><em>ask for help</em></a>!</li> |
491 </ul> | 491 </ul> |
492 </section> | 492 </section> |
493 | 493 |
494 {{/partials.standard_nacl_article}} | 494 {{/partials.standard_nacl_article}} |
OLD | NEW |