|
Native Client is now built into the Dev channel of Google Chrome. This page tells you how to enable and use the integrated version of Native Client. Note: For now, the integrated version of Native Client has less functionality than the plug-in. If you want to see everything that Native Client can do, download the tarball and install the plug-in. For details of what's different about the integrated version, see Known issues. Contents: How to enable Native Client in Google Chrome- Download Google Chrome, if you don't already have it.
- Subscribe to the Dev channel.
- Launch Google Chrome from the command line, adding --internal-nacl --no-sandbox. If you're in the directory that contains chrome.exe (something like C:\Documents and Settings\me\Local Settings\Application Data\Google\Chrome\Application), your command should look like this:
chrome.exe --internal-nacl --no-sandbox Warning: Currently, using --internal-nacl requires disabling the Google Chrome sandbox. This is related to a bug that we expect to fix soon, but for now, we recommend running Google Chrome with the --internal-nacl flag only for testing Native Client and not for regular web browsing. How to find and run examples and tests- In any browser, bring up the Getting Started document. You'll follow some—but not all—of its instructions. Specifically:
- Get the software. (Download the tarball, extract the files, and make sure you have the right version of Python.)
- Start a local HTTP server, if one isn't already running on your computer.
- In Google Chrome, view the Browser Test Page, using localhost for the hostname. For example:
http://localhost:5103/scons-out/nacl-x86-32/staging/examples.html
- Click links to examples and tests to run them.
When Google Chrome is launched with the --internal-nacl flag, the integrated version of Native Client is used to run the examples and tests. Otherwise, the Native Client plug-in (if installed) is used to run them. The following tests should work in the integrated version of Native Client: - Tests that have no audio or graphics
The results of these tests should be the same as if you executed them in Google Chrome using the Native Client plug-in.
- Mandelbrot performance test
This works because all drawing is from JavaScript; Native Client is used only for calculations.
The following examples don't currently work: - Examples with graphics (except for the Mandelbrot performance test)
This includes everything in the Examples column except the SRPC hello world example.
For details about what each example and test contains, see the Examples and Tests page and the README files in the source code. Known issues- Graphics and audio from native code don't work yet. Think of Native Client as a windowless plug-in. Proposed NPAPI improvements (announcement, spec) will provide access to video and audio.
- Native Client in Google Chrome has been tested only on Windows. It probably doesn't work on Mac or Linux.
- Enabling Native Client currently requires disabling the Google Chrome sandbox. In other words, --internal-nacl requires --no-sandbox.
More informationFor information about the design and implementation of Google Chrome, see the Chromium project website.
|
I tried using the --internal-nacl command and Native Client failed. When I switched to --enable-nacl, everything worked flawlessly.
The correct flag is --internal-nacl. When you use --enable-nacl, the flag is ignored by Chrome; in this case it will use the NaCl? plugin if you installed it previously. The failure you are seeing with --internal-nacl is a bug and I've filed an issue report (#106).
It looks like you might need to explicitly specify --no-sandbox, so I've added that to the instructions.
My OS is Vista and i am nether able to run the --internal nacl command nor the --enable nacl command. am i the only one facing this challenge?
The command line flags that are currently required to enable the built-in Native Client are "--internal-nacl" and "--no-sandbox". However, if you're using 64-bit Vista, that (and anything else 64-bit) doesn't work yet. Sorry about that.