3 Download the Native Client SDK
4 ==============================
6 This page provides an overview of the Native Client SDK, and instructions for
7 downloading and installing the SDK.
12 <a class="button-nacl button-download" href="http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
20 The Native Client SDK includes:
22 - **Support for multiple Pepper versions** to compile for specific minimum
24 - **Update utility** to download new bundles and updates to existing bundles.
25 - **Toolchains** to compile for Portable Native Client (PNaCl), traditional
26 Native Client (NaCl), and for compiling architecture-specific Native Client
27 applications with glibc.
28 - **Examples** Including C or C++ source files and header files illustrating
29 how to use NaCl and Pepper, and Makefiles to build the example with each of
31 - **Tools** for validating Native Client modules and running modules from the
34 Follow the steps below to download and install the Native Client SDK.
46 Make sure that the Python executable is in your ``PATH`` variable. Python 3.x is
49 * On Mac and Linux, Python is likely preinstalled. Run the command ``python -V``
50 in a terminal window, and make sure that the version you have is 2.7.x.
51 * On Windows, you may need to install Python. Go to `http://www.python.org/
52 download/ <http://www.python.org/download/>`_ and select the latest 2.x
53 version. In addition, be sure to add the Python directory (for example,
54 ``C:\python27``) to the ``PATH`` `environment variable <http://en.wikipedia.
55 org/wiki/Environment_variable>`_. Run ``python -V`` from a command line to
56 verify that you properly configured the PATH variable.
63 * On the Mac, you need to install ``make`` on your system before you can build
64 and run the examples in the SDK. One easy way to get ``make``, along with
65 several other useful tools, is to install `Xcode Developer Tools
66 <https://developer.apple.com/technologies/tools/>`_. After installing Xcode,
67 go to the XCode menu, open the Preferences dialog box then select Downloads
68 and Components. Verify that Command Line Tools are installed. If you'd rather
69 not install Xcode, you can download and build an `open source version
70 <http://mac.softpedia.com/dyn-postdownload.php?p=44632&t=4&i=1>`_ of ``make``.
71 To build the program you may also need to download and install `gcc
72 <https://github.com/kennethreitz/osx-gcc-installer>`_.
73 * On Windows, the Native Client SDK includes a copy of GNU Make.
80 Native Client supports several operating systems, including Windows, Linux, OSX,
81 and ChromeOS. It supports several architectures including on x86-32, x86-64,
89 Chrome is released on a six week cycle, and developer versions of Chrome are
90 pushed to the public beta channel three weeks before each release. As with any
91 software, each release of Chrome may include changes to Native Client and the
92 Pepper interfaces that may require modification to existing applications.
93 However, modules compiled for one version of Pepper/Chrome should work with
94 subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the
95 Pepper APIs to help developers make adjustments to API changes and take
96 advantage of new features: `stable </native-client/pepper_stable>`_, `beta
97 </native-client/pepper_beta>`_ and `dev </native-client/pepper_dev>`_.
99 .. _installing-the-sdk:
104 .. _downloading-and-unzipping:
106 Downloading and Unzipping
107 ^^^^^^^^^^^^^^^^^^^^^^^^^
109 #. Download the `SDK update zip file
110 <http://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip>`_.
114 * On Mac/Linux, run the command ``unzip nacl_sdk.zip`` in a terminal
116 * On Windows, right-click on the .zip file and select "Extract All...". A
117 dialog box opens; enter a location and click "Extract".
119 A directory is created called ``nacl_sdk`` with the following files and
122 * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility,
123 which is the command you run to download and update bundles.
124 * ``sdk_cache`` --- a directory with a manifest file that lists the bundles
125 you have already downloaded.
126 * ``sdk_tools`` --- the code run by the ``naclsdk`` command.
128 .. _installing-the-stable-bundle:
130 Installing the stable bundle
131 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
133 #. To see the SDK bundles that are available for download, go to the
134 ``nacl_sdk`` directory and run ``naclsdk`` with the ``list`` command. The SDK
135 includes a separate bundle for each version of Chrome/Pepper.
147 You should see output similar to this::
155 pepper_31 (post_stable)
156 pepper_32 (post_stable)
157 pepper_33 (post_stable)
158 pepper_34 (post_stable)
162 pepper_canary (canary)
163 bionic_canary (canary)
166 The sample output above shows that several bundles are available for
167 download, and that you have already installed the latest revision of the
168 ``sdk_tools`` bundle, which was included in the zip file. You never need to
169 update the ``sdk_tools`` bundle. It is updated automatically (if necessary)
170 whenever you run ``naclsdk``.
172 Bundles are labeled post-stable, stable, beta, dev, or canary. These labels
173 usually correspond to the current versions of Chrome. We recommend that you
174 develop against a "stable" bundle, because such bundles can be used by all
175 current Chrome users. Native Client is designed to be backward-compatible.For
176 example, applications developed with the ``pepper_37`` bundle can run in
177 Chrome 37, Chrome 38, etc..
179 #. Run ``naclsdk`` with the ``update`` command to download recommended bundles,
180 including the current "stable" bundle.
190 By default, ``naclsdk`` only downloads bundles that are recommended,
191 generally those that are "stable." For example, if the current "stable"
192 bundle is ``pepper_35``, then the ``update`` downloads that bundle. To
193 download the ``pepper_36`` bundle you must ask for it explicitly::
195 $ ./naclsdk update pepper_36
199 .. _updating-bundles:
204 #. Run ``naclsdk`` with the ``list`` command. This shows you the list of available
205 bundles and verifies which bundles you have installed.
215 An asterisk (*) next to a bundle indicates that there is an update available
224 pepper_31 (post_stable)
225 pepper_32 (post_stable)
226 pepper_33 (post_stable)
227 pepper_34 (post_stable)
228 I* pepper_35 (stable)
231 pepper_canary (canary)
232 bionic_canary (canary)
235 If you run ``naclsdk update`` now, it warns you with a message similar to
238 WARNING: pepper_35 already exists, but has an update available. Run update
239 with the --force option to overwrite the existing directory. Warning: This
240 will overwrite any modifications you have made within this directory.
242 #. To download and install the new bundle, run:
246 $ ./naclsdk update --force
250 > naclsdk update --force
252 .. _help-with-the-naclsdk-utility:
254 Help with the ``naclsdk`` utility
255 ---------------------------------
257 #. For more information about the ``naclsdk`` utility, run:
272 * Browse the `Release Notes <release-notes>`_ for important
273 information about the SDK and new bundles.
274 * If you're just starting with Native Client, we recommend reading the
275 `Technical Overview <../overview>`_ and walking through the
276 `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_.
277 * If you'd rather dive in, see
278 `Building Native Client Modules <devguide/devcycle/building>`_.