1.. _download:
2
3.. include:: /migration/deprecation.inc
4
5Download the Native Client SDK
6==============================
7
8This page provides an overview of the Native Client SDK, and instructions for
9downloading and installing the SDK.
10
11.. raw:: html
12
13  <div id="home">
14  <a class="button-nacl button-download" href="https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip">Download SDK Zip File</a>
15  </div>
16
17.. _sdk-overview:
18
19Overview
20--------
21
22The Native Client SDK includes:
23
24- **Support for multiple Pepper versions** to compile for specific minimum
25  versions of Chrome.
26- **Update utility** to download new bundles and updates to existing bundles.
27- **Toolchains** to compile for Portable Native Client (PNaCl), traditional
28  Native Client (NaCl), and for compiling architecture-specific Native Client
29  applications with glibc.
30- **Examples** Including C or C++ source files and header files illustrating
31  how to use NaCl and Pepper, and Makefiles to build the example with each of
32  the toolchains.
33- **Tools** for validating Native Client modules and running modules from the
34  command line.
35
36Follow the steps below to download and install the Native Client SDK.
37
38.. _prerequisites:
39
40Prerequisites
41-------------
42
43.. _python27:
44
45Python 2.7
46^^^^^^^^^^
47
48Make sure that the Python executable is in your ``PATH`` variable. Python 3.x is
49not yet supported.
50
51* On Mac and Linux, Python is likely preinstalled. Run the command ``python -V``
52  in a terminal window, and make sure that the version you have is 2.7.x.
53* On Windows, you may need to install Python. Go to `https://www.python.org/
54  download/ <https://www.python.org/download/>`_ and select the latest 2.x
55  version. In addition, be sure to add the Python directory (for example,
56  ``C:\python27``) to the ``PATH`` `environment variable <https://en.wikipedia.
57  org/wiki/Environment_variable>`_. Run ``python -V`` from a command line to
58  verify that you properly configured the PATH variable.
59
60.. _make:
61
62Make
63^^^^
64
65* On the Mac, you need to install ``make`` on your system before you can build
66  and run the examples in the SDK. One easy way to get ``make``, along with
67  several other useful tools, is to install `Xcode Developer Tools
68  <https://developer.apple.com/technologies/tools/>`_. After installing Xcode,
69  go to the XCode menu, open the Preferences dialog box then select Downloads
70  and Components. Verify that Command Line Tools are installed.
71* On Windows, the Native Client SDK includes a copy of GNU Make.
72
73.. _platforms:
74
75Platforms
76---------
77
78Native Client supports several operating systems, including Windows, Linux,
79macOS, and Chrome OS. It supports several architectures including on x86-32,
80x86-64, ARM, and MIPS.
81
82.. _versioning:
83
84Versions
85--------
86
87Chrome is released on a six week cycle, and developer versions of Chrome are
88pushed to the public beta channel three weeks before each release. As with any
89software, each release of Chrome may include changes to Native Client and the
90Pepper interfaces that may require modification to existing applications.
91However, modules compiled for one version of Pepper/Chrome should work with
92subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the
93Pepper APIs to help developers make adjustments to API changes and take
94advantage of new features: `stable </native-client/pepper_stable>`_, `beta
95</native-client/pepper_beta>`_ and `dev </native-client/pepper_dev>`_.
96
97.. _installing-the-sdk:
98
99Installing the SDK
100------------------
101
102.. _downloading-and-unzipping:
103
104Downloading and Unzipping
105^^^^^^^^^^^^^^^^^^^^^^^^^
106
107#. Download the `SDK update zip file
108   <https://storage.googleapis.com/nativeclient-mirror/nacl/nacl_sdk/nacl_sdk.zip>`_.
109
110#. Unzip the file:
111
112   * On Mac/Linux, run the command ``unzip nacl_sdk.zip`` in a terminal
113     window.
114   * On Windows, right-click on the .zip file and select "Extract All...". A
115     dialog box opens; enter a location and click "Extract".
116
117   A directory is created called ``nacl_sdk`` with the following files and
118   directories:
119
120   * ``naclsdk`` (and ``naclsdk.bat`` for Windows) --- the update utility,
121     which is the command you run to download and update bundles.
122   * ``sdk_cache`` --- a directory with a manifest file that lists the bundles
123     you have already downloaded.
124   * ``sdk_tools`` --- the code run by the ``naclsdk`` command.
125
126.. _installing-the-stable-bundle:
127
128Installing the stable bundle
129^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130
131#. To see the SDK bundles that are available for download, go to the
132   ``nacl_sdk`` directory and run ``naclsdk`` with the ``list`` command. The SDK
133   includes a separate bundle for each version of Chrome/Pepper.
134
135   On Mac/Linux::
136
137     $ cd nacl_sdk
138     $ ./naclsdk list
139
140   On Windows::
141
142     > cd nacl_sdk
143     > naclsdk list
144
145   You should see output similar to this::
146
147    Bundles:
148     I: installed
149     *: update available
150
151      I  sdk_tools (stable)
152         vs_addin (dev)
153         pepper_31 (post_stable)
154         pepper_32 (post_stable)
155         pepper_33 (post_stable)
156         pepper_34 (post_stable)
157         pepper_35 (stable)
158         pepper_36 (beta)
159         pepper_37 (dev)
160         pepper_canary (canary)
161
162
163   The sample output above shows that several bundles are available for
164   download, and that you have already installed the latest revision of the
165   ``sdk_tools`` bundle, which was included in the zip file. You never need to
166   update the ``sdk_tools`` bundle. It is updated automatically (if necessary)
167   whenever you run ``naclsdk``.
168
169   Bundles are labeled post-stable, stable, beta, dev, or canary. These labels
170   usually correspond to the current versions of Chrome. We recommend that you
171   develop against a "stable" bundle, because such bundles can be used by all
172   current Chrome users. Native Client is designed to be backward-compatible.For
173   example, applications developed with the ``pepper_37`` bundle can run in
174   Chrome 37, Chrome 38, etc..
175
176#. Run ``naclsdk`` with the ``update`` command to download recommended bundles,
177   including the current "stable" bundle.
178
179   On Mac/Linux::
180
181     $ ./naclsdk update
182
183   On Windows::
184
185     > naclsdk update
186
187   By default, ``naclsdk`` only downloads bundles that are recommended,
188   generally those that are "stable." For example, if the current "stable"
189   bundle is ``pepper_35``, then the ``update`` downloads that bundle. To
190   download the ``pepper_36`` bundle you must ask for it explicitly::
191
192     $ ./naclsdk update pepper_36
193
194
195
196.. _updating-bundles:
197
198Updating bundles
199----------------
200
201#. Run ``naclsdk`` with the ``list`` command. This shows you the list of available
202   bundles and verifies which bundles you have installed.
203
204   On Mac/Linux::
205
206     $ ./naclsdk list
207
208   On Windows::
209
210     > naclsdk list
211
212   An asterisk (*) next to a bundle indicates that there is an update available
213   it. For example::
214
215    Bundles:
216     I: installed
217     *: update available
218
219      I  sdk_tools (stable)
220         vs_addin (dev)
221         pepper_31 (post_stable)
222         pepper_32 (post_stable)
223         pepper_33 (post_stable)
224         pepper_34 (post_stable)
225      I* pepper_35 (stable)
226         pepper_36 (beta)
227         pepper_37 (dev)
228         pepper_canary (canary)
229
230
231   If you run ``naclsdk update`` now, it warns you with a message similar to
232   this::
233
234     WARNING: pepper_35 already exists, but has an update available. Run update
235     with the --force option to overwrite the existing directory. Warning: This
236     will overwrite any modifications you have made within this directory.
237
238#. To download and install the new bundle, run:
239
240   On Mac/Linux::
241
242     $ ./naclsdk update --force
243
244   On Windows::
245
246     > naclsdk update --force
247
248.. _help-with-the-naclsdk-utility:
249
250Help with the ``naclsdk`` utility
251---------------------------------
252
253#. For more information about the ``naclsdk`` utility, run:
254
255   On Mac/Linux::
256
257     $ ./naclsdk help
258
259   On Windows::
260
261     > naclsdk help
262
263.. _next-steps:
264
265Next steps
266----------
267
268* Browse the `Release Notes <release-notes>`_ for important
269  information about the SDK and new bundles.
270* If you're just starting with Native Client, we recommend reading the
271  `Technical Overview <../overview>`_ and walking through the
272  `Getting Started Tutorial <devguide/tutorial/tutorial-part1>`_.
273* If you'd rather dive in, see
274  `Building Native Client Modules <devguide/devcycle/building>`_.
275