Home | History | Annotate | Download | only in doc
      1 ########################
      2 Welcome to Native Client
      3 ########################
      4 
      5 .. raw:: html
      6 
      7   <div id="home">
      8   <div class="pull-quote">To get the SDK and<br/>installation instructions<br/>
      9   <a href="/native-client/sdk/download.html">visit the SDK Download page</a>.
     10   </div>
     11   <div class="big-intro">
     12 
     13 **Native Client** is a sandbox for running compiled C and C++ code in the
     14 browser efficiently and securely, independent of the user's operating system.
     15 **Portable Native Client** extends that technology with
     16 architecture independence, letting developers compile their code once to run
     17 in any website and on any architecture with ahead-of-time (AOT) translation.
     18 
     19 In short, Native Client brings the **performance** and **low-level control**
     20 of native code to modern web browsers, without sacrificing the **security** and
     21 **portability** of the web. Watch the video below for an overview of
     22 Native Client, including its goals, how it works, and how
     23 Portable Native Client lets developers run native compiled code on the web. 
     24 
     25 .. Note::
     26   :class: note
     27 
     28   This site uses several examples of Native Client. For the best experience,
     29   consider downloading the `latest version of Chrome 
     30   <http://www.google.com/chrome/>`_. When you come back, be sure to `check out
     31   our demos <https://gonativeclient.appspot.com/demo>`_.
     32 
     33 .. raw:: html
     34 
     35   </div>
     36 
     37   <iframe class="video" width="600" height="337"
     38   src="//www.youtube.com/embed/MvKEomoiKBA?rel=0" frameborder="0"></iframe>
     39   <div class="big-intro">
     40   
     41 Two Types of Modules
     42 ====================
     43 
     44 Native Client comes in two flavors.
     45 
     46 * **Portable Native Client (PNaCl)**: Pronounced 'pinnacle', PNaCl runs single,
     47   portable (**pexe**) executables and is available in most implementations of
     48   Chrome. A translator built into Chrome translates the pexe into native code
     49   for the client hardware. The entire module is translated before any code is
     50   executed rather than as the code is executed. PNaCl modules can be hosted from
     51   any web server.
     52 * **Native Client (NaCl)**: Also called traditional or non-portable Native
     53   Client, NaCl runs architecture-dependent (**nexe**) modules, which are
     54   packaged into an application. At runtime, the browser decides which nexe to
     55   load based on the architecture of the client machine. NaCl modules must be run
     56   from the `Chrome Web Store (CWS) 
     57   <https://chrome.google.com/webstore/category/apps>`_. Fortunately, work from
     58   PNaCl modules can be used to create NaCl modules. 
     59   
     60 These flavors are described in more depth in :doc:`PNaCl and NaCl 
     61 <nacl-and-pnacl>`
     62 
     63 .. raw:: html
     64 
     65   <div class="left-side">
     66   <div class="left-side-inner">
     67   <h2>Hello World</h2>
     68   <div class="big-intro">
     69 
     70 To jump right in :doc:`take the tutorial <devguide/tutorial/tutorial-part1>`
     71 that walks you through a basic web application for Portable Native Client
     72 (PNaCl). This is a client-side application that uses HTML, JavaScript, and a
     73 Native Client module written in C++.
     74 
     75 .. raw:: html
     76 
     77   </div>
     78   </div>
     79   </div>
     80   <h2>A Little More Advanced</h2>
     81   <div class="big-intro">
     82 
     83 If you've already got the basics down, you're probably trying to get a real
     84 application ready for production. You're :doc:`building 
     85 <devguide/devcycle/building>`, :doc:`debugging <devguide/devcycle/debugging>`
     86 or :doc:`ready to distribute <devguide/distributing>`.
     87 
     88 .. raw:: html
     89 
     90   </div>
     91 
     92   <div class="left-side">
     93   <div class="left-side-inner">
     94   <h2>Nuts and Bolts</h2>
     95   <div class="big-intro">
     96   
     97 You've been working on a Native Client module for a while now and you've run
     98 into an arcane problem. You may need to refer to the :doc:`PNaCl Bitcode
     99 Reference <reference/pnacl-bitcode-abi>` or the :doc:`Sandbox internals 
    100 <reference/sandbox_internals/index>`.
    101 
    102 .. raw:: html
    103 
    104   </div>
    105   </div>
    106   </div>
    107 
    108 I Want to Know Everything
    109 =========================
    110 
    111 So, you like to read now and try later. Start with our :doc:`Technical Overview
    112 <overview>`
    113 
    114 .. raw:: html
    115 
    116   <div class="big-intro" style="clear: both;">
    117 
    118 Send us questions, comments, and feedback: `native-client-discuss 
    119 <https://groups.google.com/forum/#!forum/native-client-discuss>`_.
    120 
    121 .. raw:: html
    122 
    123   </div>
    124