My favorites | Sign in
Google
                
Search
for
Updated Oct 05, 2009 by kathyw+...@google.com
Labels: Featured
NativeClientInGoogleChrome  
A preview of Native Client in the browser, no plug-ins required

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

  1. Download Google Chrome, if you don't already have it.
  2. Subscribe to the Dev channel.
  3. 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

  1. In any browser, bring up the Getting Started document. You'll follow some—but not all—of its instructions. Specifically:
    1. Get the software. (Download the tarball, extract the files, and make sure you have the right version of Python.)
    2. Start a local HTTP server, if one isn't already running on your computer.



  2. 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



  3. 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

More information

For information about the design and implementation of Google Chrome, see the Chromium project website.


Comment by cyclingroo, Oct 03, 2009

I tried using the --internal-nacl command and Native Client failed. When I switched to --enable-nacl, everything worked flawlessly.

Comment by bradc...@google.com, Oct 05, 2009

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).

Comment by kathyw+...@google.com, Oct 05, 2009

It looks like you might need to explicitly specify --no-sandbox, so I've added that to the instructions.

Comment by thechiaman, Oct 15, 2009

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?

Comment by gregoryd...@google.com, Oct 15, 2009

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.


Sign in to add a comment