If you just want to look at the source code, you can either browse it online or download it with git. Here's how to download the latest version of the source code:
git clone https://chromium.googlesource.com/native_client/src/native_client
If you use git clone
, the source code appears under a directory named native_client
in the current directory. You can update it using git pull
.
If you want to build the latest version of Native Client, follow these steps:
If you don't already have gclient
, get it by downloading the Chromium depot tools.
If you don't already have git, download it.
Create a directory to hold the Native Client source code. We'll call it $NACL_ROOT
.
Important: Make sure the path to the directory has no spaces. Examples of good $NACL_ROOT
values:
/home/me/nativeclient
(Linux)/Users/me/nativeclient
(Mac)C:\nativeclient
(Windows)In a shell window, execute the following commands:
cd $NACL_ROOT gclient config https://chromium.googlesource.com/native_client/src/native_client cd $NACL_ROOT gclient sync
Here's what the gclient
steps do:
gclient config
sets up your working directory, creating a .gclient
file that identifies the structure to pull from the repository.gclient sync
creates several subdirectories and downloads the latest Native Client files.To update the Native Client source code, run gclient sync
from $NACL_ROOT
or any of its subdirectories. Once you've downloaded the source code, you can build Native Client. To do so, you need Python and a platform-specific development environment. Details on prerequisites and how to build are in Building Native Client.