{{+bindTo:partials.standard_nacl_article}}
NOTE:
Deprecation of the technologies described here has been announced
for platforms other than ChromeOS.
Please visit our
migration guide
for details.
The dates in the following release notes denote when Chrome and the NaCl SDK reached canary status. The stable release is typically 6 weeks later.
acquire
, release
, and acq_rel
memory orders are now
generated by default. The in-browser Chrome 42 translator supports them, the
SDK can therefore generate them.bswap
which led to a NaCl validation failure.X
is only compatible with the
PNaCl translator in chrome version X
. The bitcode debug metadata format
changed from LLVM 3.5 to 3.6. If you need to debug an app built with SDK
version X
running in Chrome version Y
(with X != Y
), it is still
possible to do so. Simply translate the pexe to a nexe using the
offline pnacl-translate tool from SDK version X instead of using the translator in the
browser (version Y
).--enable-pnacl-subzero
commandline flag, and use the optlevel 0
NaCl manifest option. Application startup time
should be several times faster than the previous LLVM-based optlevel 0
mode, with similar code quality. Note that x86-32 NaCl requires a 32-bit
Chrome. On Windows, it also requires a 32-bit Windows OS, but 64-bit Linux
OSes can run x86-32 NaCl. If you try it out, please send us feedback
on native-client-dev. We are working on improvements and adding
new targets.i686-nacl-clang
,
x86_64-nacl-clang
, and arm-nacl-clang
as well as the clang++
equivalents. These toolchains are based on the same LLVM version as PNaCl, but
can be used to generate NaCl .nexe
files instead of translating a
.pexe
locally or using the GCC toolchain.VGATHER
).acquire
, release
, and
acq_rel
. It used to upgrade all accesses to seq_cst
. It still upgrades
consume
to acquire
(no compiler currently implements consume
), and
relaxed
to seq_cst
(to conservatively avoid platform differences due
to out-of-thin-air problems). This is currently disabled by default in the SDK
so that the in-browser translator installed on users’ machines has time to
gain this support. Developers can turn it on by passing the
-pnacl-memory-order-seq-cst-only=false
flag to opt
.pepper_canary/examples/api/video_decode
.DEBUG_ONLY:dev://postmessage
has been removed in favor of
other more useful debugging approaches.postMessageAndAwaitResponse
is now stable and allows JavaScript to
communicate synchronously with PNaCl
embeds.pp::Var
will contain a pp::Resource
that can be given to the
pp::FileSystem
constructor.setjmp
/longjmp
exception
handling (see announcement
for details).nacl_io
library now includes a FUSE mount.common.js
now loads the Release version of the
nexes/pexes that are built (by default).make debug
” and “make run
” have been fixed on Mac.pepper_30
bundle in the SDK must be recompiled
with the pepper_31
bundle or later.
As a general rule, we always recommended building applications with the latest
stable bundle in the Native Client SDK.
The PNaCl ABI will remain stable starting with the release of Chrome 31.Additional changes in the Chrome/Pepper 31 release:
nacl_io
librarypepper_canary
bundle. Chrome 29 does not support .pexe
files produced by earlier versions of the pnacl toolchain (that is,
executables compiled with the pepper_28
bundle or earlier).--enable-pnacl
flag (for Chrome apps), or the --enable-nacl
flag (for other apps).--enable-pnacl
flag, Chrome loads a PNaCl
translator in the background. Wait about a minute after you launch Chrome and
check chrome://nacl to verify that the translator loaded.The Pepper 27 bundle features a significant number of new libraries that have been incorporated directly into the SDK.
A number of libraries from the naclports project have been incorporated directly into the Native Client SDK. These libraries include:
The libraries are located in ports/lib
, and the header files are in
ports/include
.
httpfs
filesystem in the nacl_io library now caches content in memory
by default; this improves performance considerably.dlopen()
can now be
used to open shared libraries that are not specified in an application’s
Native Client manifest (.nmf) file. This allows applications, for example, to
download a shared object and then use dlopen()
to access the shared
object. The dlopen
example has been modified to demonstrate this
functionality: reverse.cc is built into a shared object (.so) file, which is
downloaded and opened using an httpfs
mount.index.html
file, instead of multiple HTML
files corresponding to NaCl modules built using different toolchains and
configurations. By default, most examples are built using one toolchain
(newlib) and one configuration (Debug). If you build an example using
multiple toolchains or configurations, you can specify which version to run
in Chrome using the query parameters tc
and config
. For example,
assuming you are serving an example from the local server localhost:5103, you
can run a version of the example built with the glibc toolchain in the
Release configuration by specifying the following URL in Chrome:
http://localhost:5103/index.html?tc=glibc&config=Release
. For additional
information about how different NaCl modules are loaded into index.html
,
see the common.js
file in each example.tools/common.mk
, can now handle source files
located outside of an application’s root directory. For example, a Makefile
for an application can specify a source file to compile such as
../../some/other/place.cpp
.The Pepper 26 bundle includes a new HTTP filesystem type in the nacl_mounts library (which has been renamed nacl_io), changes to the example Makefiles, a simple new 3D example, and a threaded file IO example.
Makefiles have been changed significantly:
tools/*.mk
), which are included in the Makefiles in the examples.CC
newlib/Debug/hello_world_x86_32.o
) rather than the actual build commands.
To see the actual build commands, run make V=1
.make
with the parameters TOOLCHAIN=<x>
or
CONFIG=<y>
. You can also run make all_versions
to build an example
with all toolchains.include/nacl_io/nacl_io.h
, as well as the
hello_nacl_io
example.pepper_20
and earlier) have been removed from the Native
Client SDK Manifest, and will no longer be updated by the naclsdk
command.The Pepper 25 bundle features an ARM toolchain to build Native Client modules for ARM devices, two new Pepper APIs (including the MessageLoop API, which lets you make Pepper calls on background threads), two new libraries (nacl_mounts, which provides a virtual file system that you can use with standard C file operations, and ppapi_main, which lets you implement a Native Client module using a simple ppapi_main function), and two new examples that demonstrate how to use the nacl_mounts and ppapi_main libraries.
The SDK includes a new toolchain to build Native Client executables (.nexe files) for ARM devices.
pepper_25/toolchain/<host>_arm_newlib
. The bin subdirectory contains
the compiler (arm-nacl-gcc
), the linker (arm-nacl-g++
), and the
other tools in the toolchain.hello_world
example to see how to use the ARM
toolchain. Go to examples/hello_world
and run make
. When the build
finishes, the newlib/Debug and newlib/Release subdirectories will contain
.nexe files for the x86-32, x86-64, and ARM target architecutes, and a
Native Client manifest (.nmf file) that references those three .nexe files.httpd.py
, has been moved from
the examples/
directory to the tools/
directory. On Windows, you can
run httpd.cmd
(in the examples/
directory) to start the server.Pepper 25 includes two new APIs:
pepper_25/include/ppapi/utility/threading/simple_thread.h
. Note that you
cannot make asynchronous PPAPI calls on a background thread without creating
and using a message loop.The SDK includes two new libraries:
The nacl_mounts library provides a virtual file system that your module can “mount” in a given directory tree. The file system can be one of several types:
/dev/null
,
/dev/console[0-3]
, /dev/tty
), andOnce you’ve mounted a file system in your module, you can use standard C library file operations: fopen, fread, fwrite, fseek, and fclose. How those operations are performed depends on the type of file system (e.g., for html5fs, the operations are performed using the Pepper FileIO API). For a list of the types of file systems you can mount, see include/nacl_mounts/nacl_mounts.h. For an example of how to use nacl_mounts, see examples/hello_nacl_mounts. Note that html5fs is subject to the same constraints as persistent local file IO in Chrome (for example, prior to using an html5fs file system, you must enable local file IO).
Header files for the new libraries are in the include/
directory, source
files are in the src/
directory, and compiled libraries are in the lib/
directory.
The SDK includes two new examples:
With a few exceptions, the Makefile for each example now builds the following versions of each example:
make RUN
and
make LAUNCH
. These targets, which are interchangeable, launch a local
server and an instance of Chrome to run an example. When the instance of
Chrome is closed, the local server is shut down as well.The Pepper 24 bundle features a new, experimental toolchain called PNaCl (short for “Portable Native Client”), a new library (pthreads-win32) for the Windows SDK, and an expanded list of attributes for Pepper 3D contexts that lets applications specify a GPU preference for low power or performance.
hello_world
example to see how to build a .pexe
file and translate it into multiple .nexe files. Note that PNaCl is currently
restricted to the newlib C standard library – if your application uses glibc,
you can’t build it with PNaCl.create_nmf.py
script uses ELF headers (rather than file names) to
determine the architecture of .nexe files. That means you can change the
names of your .nexe files and create_nmf.py
will still be able to
generate the appropriate Native Client manifest file for your application.The Pepper 23 bundle includes support for the nacl-gdb debugger on Mac and 32-bit Windows, resources to enable hosted development on Linux, and changes to make the SDK examples compliant with version 2 of the Chrome Web Store manifest file format.
naclsdk list
, the utility displays one line for each available
bundle, annotated with an “I
” if the bundle is already installed on your
system, and a “*
” if the bundle has an update available. To see full
information about a bundle, use the command naclsdk info <bundle>
(for
example, naclsdk info pepper_28
).Developers using the Linux SDK now have resources, including pre-built libraries and example Makefiles, that make it easier to build a module as a Pepper plugin (sometimes called a “trusted” or “in-process” plugin) using the native C/C++ compiler on their development system. In essence this makes developing a Native Client module a two-step process:
This two step development process has many benefits—in particular, you can use the compilers, debuggers, profilers, and other tools that you’re already familiar with. But there are a few potential issues to keep in mind:
Here are the resources you can use to build your module into a Pepper plugin:
pepper_23/include
pepper_23/src
pepper_23/lib
You can now build and run most of the examples in the SDK as Pepper plugins.
make
in the example directories to
see the commands and flags used to build modules as Pepper plugins.make LAUNCH
in the example directories to see how to use the
--register-pepper-plugins
argument to load a Pepper plugin in Chrome.
Note that you must set the CHROME_PATH
environment variable and start a
local server prior to running this command.<script>
blocks and inline event handlers (e.g., <button
onclick="...">
). See Manifest Version for
a list of changes between version 1 and version 2 of the manifest file
format, and a support schedule for applications that use version 1.The Pepper 22 bundle includes a command-line debugger, resources to enable hosted development on Windows, and changes to the example Makefiles (each example now builds both a debug and a release version).
Developers using the Windows SDK can now build a module as a Pepper plugin (sometimes called a “trusted” or “in-process” plugin) using the native C/C++ compiler on their development system. In essence this makes developing a Native Client module a two-step process:
This two step development process has many benefits—in particular, you can use the compilers, debuggers, profilers, and other tools that you’re already familiar with. But there are a few potential issues to keep in mind:
Here are the resources you can use to build your module into a DLL:
pepper_22\include
pepper_22\src
pepper_22\lib
CompletionCallbackFactory
class template now takes a thread traits
class as its second parameter. For details see the CompletionCallbackFactory
class template reference.