Download the Native Client SDK
This page provides an overview of the Native Client SDK, and instructions for downloading and installing the SDK.
The Native Client SDK includes:
- Support for multiple Pepper versions to compile for specific minimum versions of Chrome.
- Update utility to download new bundles and updates to existing bundles.
- Toolchains to compile for Portable Native Client (PNaCl), traditional Native Client (NaCl), and for compiling architecture-specific Native Client applications with glibc.
- Examples Including C or C++ source files and header files illustrating how to use NaCl and Pepper, and Makefiles to build the example with each of the toolchains.
- Tools for validating Native Client modules and running modules from the command line.
Follow the steps below to download and install the Native Client SDK.
Make sure that the Python executable is in your
PATH variable. Python 3.x is
not yet supported.
- On Mac and Linux, Python is likely preinstalled. Run the command
python -Vin a terminal window, and make sure that the version you have is 2.7.x.
- On Windows, you may need to install Python. Go to https://www.python.org/
download/ and select the latest 2.x
version. In addition, be sure to add the Python directory (for example,
C:\python27) to the
PATHenvironment variable. Run
python -Vfrom a command line to verify that you properly configured the PATH variable.
- On the Mac, you need to install
makeon your system before you can build and run the examples in the SDK. One easy way to get
make, along with several other useful tools, is to install Xcode Developer Tools. After installing Xcode, go to the XCode menu, open the Preferences dialog box then select Downloads and Components. Verify that Command Line Tools are installed.
- On Windows, the Native Client SDK includes a copy of GNU Make.
Native Client supports several operating systems, including Windows, Linux, OSX, and ChromeOS. It supports several architectures including on x86-32, x86-64, ARM, and MIPS.
Chrome is released on a six week cycle, and developer versions of Chrome are pushed to the public beta channel three weeks before each release. As with any software, each release of Chrome may include changes to Native Client and the Pepper interfaces that may require modification to existing applications. However, modules compiled for one version of Pepper/Chrome should work with subsequent versions of Pepper/Chrome. The SDK includes multiple versions of the Pepper APIs to help developers make adjustments to API changes and take advantage of new features: stable, beta and dev.
Installing the SDK
Downloading and Unzipping
Download the SDK update zip file.
Unzip the file:
On Mac/Linux, run the command
unzip nacl_sdk.zipin a terminal window.
On Windows, right-click on the .zip file and select “Extract All...”. A dialog box opens; enter a location and click “Extract”.
A directory is created called
nacl_sdkwith the following files and directories:
naclsdk.batfor Windows) — the update utility, which is the command you run to download and update bundles.
sdk_cache— a directory with a manifest file that lists the bundles you have already downloaded.
sdk_tools— the code run by the
Installing the stable bundle
To see the SDK bundles that are available for download, go to the
nacl_sdkdirectory and run
listcommand. The SDK includes a separate bundle for each version of Chrome/Pepper.
$ cd nacl_sdk $ ./naclsdk list
> cd nacl_sdk > naclsdk list
You should see output similar to this:
Bundles: I: installed *: update available I sdk_tools (stable) vs_addin (dev) pepper_31 (post_stable) pepper_32 (post_stable) pepper_33 (post_stable) pepper_34 (post_stable) pepper_35 (stable) pepper_36 (beta) pepper_37 (dev) pepper_canary (canary)
The sample output above shows that several bundles are available for download, and that you have already installed the latest revision of the
sdk_toolsbundle, which was included in the zip file. You never need to update the
sdk_toolsbundle. It is updated automatically (if necessary) whenever you run
Bundles are labeled post-stable, stable, beta, dev, or canary. These labels usually correspond to the current versions of Chrome. We recommend that you develop against a “stable” bundle, because such bundles can be used by all current Chrome users. Native Client is designed to be backward-compatible.For example, applications developed with the
pepper_37bundle can run in Chrome 37, Chrome 38, etc..
updatecommand to download recommended bundles, including the current “stable” bundle.
$ ./naclsdk update
> naclsdk update
naclsdkonly downloads bundles that are recommended, generally those that are “stable.” For example, if the current “stable” bundle is
pepper_35, then the
updatedownloads that bundle. To download the
pepper_36bundle you must ask for it explicitly:
$ ./naclsdk update pepper_36
listcommand. This shows you the list of available bundles and verifies which bundles you have installed.
$ ./naclsdk list
> naclsdk list
An asterisk (*) next to a bundle indicates that there is an update available it. For example:
Bundles: I: installed *: update available I sdk_tools (stable) vs_addin (dev) pepper_31 (post_stable) pepper_32 (post_stable) pepper_33 (post_stable) pepper_34 (post_stable) I* pepper_35 (stable) pepper_36 (beta) pepper_37 (dev) pepper_canary (canary)
If you run
naclsdk updatenow, it warns you with a message similar to this:
WARNING: pepper_35 already exists, but has an update available. Run update with the --force option to overwrite the existing directory. Warning: This will overwrite any modifications you have made within this directory.
To download and install the new bundle, run:
$ ./naclsdk update --force
> naclsdk update --force
Help with the
For more information about the
$ ./naclsdk help
> naclsdk help