1 {{+bindTo:partials.standard_nacl_article}} 2 3 <section id="release-notes"> 4 <span id="sdk-release-notes"></span><h1 id="release-notes"><span id="sdk-release-notes"></span>Release Notes</h1> 5 <section id="chrome-pepper-36-09-may-2014"> 6 <h2 id="chrome-pepper-36-09-may-2014">Chrome/Pepper 36 (09 May 2014)</h2> 7 <section id="pnacl"> 8 <h3 id="pnacl">PNaCl</h3> 9 <ul class="small-gap"> 10 <li>Support <a class="reference external" href="http://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors">LLVM vectors</a> 11 and <a class="reference external" href="http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html">GCC vectors</a> for SIMD 12 vectors through <a class="reference internal" href="/native-client/reference/pnacl-c-cpp-language-support.html#portable-simd-vectors"><em>Portable SIMD Vectors</em></a>. Note that this is still an early release, 13 and performance is expected to become acceptable for version 37 of 14 Chrome. More SIMD instructions will be added in later releases.</li> 15 </ul> 16 </section></section><section id="chrome-pepper-35-31-mar-2014"> 17 <h2 id="chrome-pepper-35-31-mar-2014">Chrome/Pepper 35 (31 Mar 2014)</h2> 18 <section id="id1"> 19 <h3 id="id1">PNaCl</h3> 20 <ul class="small-gap"> 21 <li>Upgraded LLVM to version 3.4.</li> 22 <li>Translation now uses dynamic load balancing, making translation time faster.</li> 23 <li>Unstable pexes (i.e. non-finalized) with debug information can be loaded by 24 Chrome, simplifying debugging with PNaCl. See <a class="reference internal" href="/native-client/devguide/devcycle/debugging.html#debugging-pnacl-pexes"><em>Debugging PNaCl pexes</em></a></li> 25 </ul> 26 </section></section><section id="chrome-pepper-34-20-feb-2014"> 27 <h2 id="chrome-pepper-34-20-feb-2014">Chrome/Pepper 34 (20 Feb 2014)</h2> 28 <section id="pepper"> 29 <h3 id="pepper">Pepper</h3> 30 <ul class="small-gap"> 31 <li>Filesystems can now be passed from JavaScript to NaCl. The resulting 32 <code>pp::Var</code> will contain a <code>pp::Resource</code> that can be given to the 33 <code>pp::FileSystem</code> constructor.</li> 34 <li>New Audio and Video input APIs have been added as dev interfaces. See 35 <a class="reference external" href="/native-client/pepper_dev/cpp/classpp_1_1_media_stream_audio_track">pp::MediaStreamAudioTrack</a> and 36 <a class="reference external" href="/native-client/pepper_dev/cpp/classpp_1_1_media_stream_video_track">pp::MediaStreamVideoTrack</a> for 37 more details.</li> 38 </ul> 39 </section><section id="id2"> 40 <h3 id="id2">PNaCl</h3> 41 <ul class="small-gap"> 42 <li>Parallel translation: at least 1.7x faster, even with older pexes.</li> 43 <li>Intelligent abbreviations in the bitcode: 20% reduction in binary size using 44 the <a class="reference internal" href="/native-client/devguide/devcycle/building.html#pnacl-compress"><em>pnacl-compress</em></a> tool.</li> 45 </ul> 46 </section></section><section id="chrome-pepper-33-16-dec-2013"> 47 <h2 id="chrome-pepper-33-16-dec-2013">Chrome/Pepper 33 (16 Dec 2013)</h2> 48 <section id="portable-native-client"> 49 <h3 id="portable-native-client">Portable Native Client</h3> 50 <ul class="small-gap"> 51 <li>PNaCl’s default C++ standard library is now LLVM’s own libc++, based on 52 LLVM 3.3. This library now supports optional <code>setjmp</code>/<code>longjmp</code> exception 53 handling (see <a class="reference external" href="https://groups.google.com/forum/#!topic/native-client-discuss/0spfg6O04FM">announcement</a> 54 for details).</li> 55 </ul> 56 </section><section id="sdk"> 57 <h3 id="sdk">SDK</h3> 58 <ul class="small-gap"> 59 <li>The <code>nacl_io</code> library now includes a FUSE mount.</li> 60 <li>In the SDK examples, <code>common.js</code> now loads the Release version of the 61 nexes/pexes that are built (by default).</li> 62 <li>“<code>make debug</code>” and “<code>make run</code>” have been fixed on Mac.</li> 63 </ul> 64 </section></section><section id="pnacl-enabled-by-default-in-chrome-31-12-nov-2013"> 65 <h2 id="pnacl-enabled-by-default-in-chrome-31-12-nov-2013">PNaCl enabled by default in Chrome 31 (12 Nov 2013)</h2> 66 <ul class="small-gap"> 67 <li>Portable Native Client (PNaCl) is enabled by default in Chrome 31. See 68 <a class="reference internal" href="/native-client/nacl-and-pnacl.html"><em>NaCl and PNaCl</em></a> for details on the differences between 69 NaCl and PNaCl.</li> 70 <li>The PNaCl ABI has changed from the preview release in Chrome 30. 71 Pexe modules built with the <code>pepper_30</code> bundle in the SDK must be recompiled 72 with the <code>pepper_31</code> bundle or later. 73 As a general rule, we always recommended building applications with the latest 74 stable bundle in the Native Client SDK. 75 The PNaCl ABI will remain stable starting with the release of Chrome 31.</li> 76 <li><p class="first">Additional changes in the Chrome/Pepper 31 release:</p> 77 <ul class="small-gap"> 78 <li>Updates to the Pepper API, including socket and network support</li> 79 <li>Improved socket support in the <code>nacl_io</code> library</li> 80 </ul> 81 </li> 82 </ul> 83 </section><section id="pnacl-in-chrome-30-dev-channel-01-aug-2013"> 84 <h2 id="pnacl-in-chrome-30-dev-channel-01-aug-2013">PNaCl in Chrome 30 Dev channel (01 Aug 2013)</h2> 85 <ul class="small-gap"> 86 <li>Portable Native Client (PNaCl) is currently available for preview in Chrome 87 30 (currently in the Dev channel). Apps and sites built with PNaCl can run in 88 Chrome 30 without an explicit flag.</li> 89 <li>See <a class="reference external" href="http://www.chromium.org/nativeclient/pnacl/introduction-to-portable-native-client">Introduction to Portable Native Client</a> 90 for information on developing for PNaCl. More documentation will be available 91 soon.</li> 92 <li>Please note that the <a class="reference external" href="http://www.chromium.org/nativeclient/pnacl/bitcode-abi">PNaCl bitcode ABI</a> may still change 93 before the official public release; if you’re developing a PNaCl-based 94 application, be sure to build your code with the latest version of the Native 95 Client SDK.</li> 96 <li>Update: PNaCl is not enabled by default in beta or stable versions of M30.</li> 97 </ul> 98 </section><section id="pnacl-15-may-2013"> 99 <h2 id="pnacl-15-may-2013">PNaCl (15 May 2013)</h2> 100 <ul class="small-gap"> 101 <li>Portable Native Client (PNaCl) is currently available for developer preview 102 in Chrome 29 or higher.</li> 103 <li>To produce a PNaCl executable (.pexe) file, you must use the pnacl toolchain 104 in the current <code>pepper_canary</code> bundle. Chrome 29 does not support .pexe 105 files produced by earlier versions of the pnacl toolchain (that is, 106 executables compiled with the <code>pepper_28</code> bundle or earlier).</li> 107 <li>To run an application with a PNaCl module, you must launch Chrome 29 with the 108 <code>--enable-pnacl</code> flag (for <a class="reference external" href="/apps/about_apps">packaged apps</a>), or the 109 <code>--enable-nacl</code> flag (for other apps).</li> 110 <li>When you launch Chrome with the <code>--enable-pnacl</code> flag, Chrome loads a PNaCl 111 translator in the background. Wait about a minute after you launch Chrome and 112 check <a class="reference external" href="chrome://nacl">chrome://nacl</a> to verify that the translator loaded.</li> 113 <li>PNaCl translators are currently available for 32-bit x86, 64-bit x86, and ARM 114 architectures.</li> 115 <li>PNaCl applications must use the newlib C library (glibc and dynamic linking 116 are not supported yet).</li> 117 <li>The intermediate representation (IR) format may change prior to the release 118 of PNaCl. If so, you will need to recompile your application with the pnacl 119 toolchain in a new SDK bundle.</li> 120 </ul> 121 </section><section id="pepper-27-12-april-2013"> 122 <h2 id="pepper-27-12-april-2013">Pepper 27 (12 April 2013)</h2> 123 <p>The Pepper 27 bundle features a significant number of new libraries that have 124 been incorporated directly into the SDK.</p> 125 <section id="libraries"> 126 <h3 id="libraries">Libraries</h3> 127 <ul class="small-gap"> 128 <li><p class="first">A number of libraries from the naclports project have been incorporated 129 directly into the Native Client SDK. These libraries include:</p> 130 <ul class="small-gap"> 131 <li>image encoding/decoding: jpeg, tiff, png, webp</li> 132 <li>multimedia: openal, freealut, ogg, vorbis</li> 133 <li>XML parsing: tinyxml, xml2</li> 134 <li>miscellaneous: zlib (general purpose compression), freetype (font 135 rendering), lua (Lua interpreter)</li> 136 </ul> 137 <p>The libraries are located in <code>ports/lib</code>, and the header files are in 138 <code>ports/include</code>.</p> 139 </li> 140 <li>The <code>httpfs</code> filesystem in the nacl_io library now caches content in memory 141 by default; this improves performance considerably.</li> 142 <li>For applications compiled with a glibc toolchain, <code>dlopen()</code> can now be 143 used to open shared libraries that are not specified in an application’s 144 Native Client manifest (.nmf) file. This allows applications, for example, to 145 download a shared object and then use <code>dlopen()</code> to access the shared 146 object. The <code>dlopen</code> example has been modified to demonstrate this 147 functionality: reverse.cc is built into a shared object (.so) file, which is 148 downloaded and opened using an <code>httpfs</code> mount.</li> 149 </ul> 150 </section><section id="examples"> 151 <h3 id="examples">Examples</h3> 152 <ul class="small-gap"> 153 <li>Each example now has a single <code>index.html</code> file, instead of multiple HTML 154 files corresponding to NaCl modules built using different toolchains and 155 configurations. By default, most examples are built using one toolchain 156 (newlib) and one configuration (Debug). If you build an example using 157 multiple toolchains or configurations, you can specify which version to run 158 in Chrome using the query parameters <code>tc</code> and <code>config</code>. For example, 159 assuming you are serving an example from the local server localhost:5103, you 160 can run a version of the example built with the glibc toolchain in the 161 Release configuration by specifying the following URL in Chrome: 162 <code>http://localhost:5103/index.html?tc=glibc&config=Release</code>. For additional 163 information about how different NaCl modules are loaded into <code>index.html</code>, 164 see the <code>common.js</code> file in each example.</li> 165 </ul> 166 </section><section id="build-tools-and-toolchains"> 167 <h3 id="build-tools-and-toolchains">Build tools and toolchains</h3> 168 <ul class="small-gap"> 169 <li>Common makefiles, including <code>tools/common.mk</code>, can now handle source files 170 located outside of an application’s root directory. For example, a Makefile 171 for an application can specify a source file to compile such as 172 <code>../../some/other/place.cpp</code>.</li> 173 </ul> 174 </section></section><section id="pepper-26-29-march-2013"> 175 <h2 id="pepper-26-29-march-2013">Pepper 26 (29 March 2013)</h2> 176 <p>The Pepper 26 bundle includes a new HTTP filesystem type in the nacl_mounts 177 library (which has been renamed nacl_io), changes to the example Makefiles, a 178 simple new 3D example, and a threaded file IO example.</p> 179 <section id="id3"> 180 <h3 id="id3">Build tools and toolchains</h3> 181 <ul class="small-gap"> 182 <li><p class="first">Makefiles have been changed significantly:</p> 183 <ul class="small-gap"> 184 <li>Build commands are now specified in a number of common files 185 (<code>tools/*.mk</code>), which are included in the Makefiles in the examples.</li> 186 <li>By default, make displays a simplified list of build steps (e.g., <code>CC 187 newlib/Debug/hello_world_x86_32.o</code>) rather than the actual build commands. 188 To see the actual build commands, run <code>make V=1</code>.</li> 189 <li>By default, most examples are built using one toolchain (newlib) and one 190 configuration (Debug). To build an example using a different toolchain or 191 configuration, run <code>make</code> with the parameters <code>TOOLCHAIN=<x></code> or 192 <code>CONFIG=<y></code>. You can also run make <code>all_versions</code> to build an example 193 with all toolchains.</li> 194 </ul> 195 </li> 196 <li>Header files have been moved out of the toolchains. All toolchains now share 197 the same set of header files as host builds. Previously host and NaCl builds 198 used different headers, which could cause build problems.</li> 199 </ul> 200 </section><section id="id4"> 201 <h3 id="id4">Libraries</h3> 202 <ul class="small-gap"> 203 <li>The nacl_mounts library has been renamed <strong>nacl_io</strong>, and has been expanded 204 with a new type of mount, httpfs, which can be used to read URLs via HTTP. 205 For details see <code>include/nacl_io/nacl_io.h</code>, as well as the 206 <code>hello_nacl_io</code> example.</li> 207 </ul> 208 </section><section id="id5"> 209 <h3 id="id5">Examples</h3> 210 <ul class="small-gap"> 211 <li>A new example, <strong>hello_world_instance3d</strong>, has been added to demonstrate a 212 simplified 3D app.</li> 213 <li>The <strong>file_io</strong> example has been rewritten to do all file operations on a 214 thread. The example demonstrates how to use the MessageLoop API and blocking 215 callbacks on a thread.</li> 216 </ul> 217 </section><section id="general"> 218 <h3 id="general">General</h3> 219 <ul class="small-gap"> 220 <li>Old bundles (<code>pepper_20</code> and earlier) have been removed from the Native 221 Client SDK Manifest, and will no longer be updated by the <code>naclsdk</code> 222 command.</li> 223 </ul> 224 </section></section><section id="pepper-25-21-december-2012"> 225 <h2 id="pepper-25-21-december-2012">Pepper 25 (21 December 2012)</h2> 226 <p>The Pepper 25 bundle features an ARM toolchain to build Native Client modules 227 for ARM devices, two new Pepper APIs (including the MessageLoop API, which lets 228 you make Pepper calls on background threads), two new libraries (nacl_mounts, 229 which provides a virtual file system that you can use with standard C file 230 operations, and ppapi_main, which lets you implement a Native Client module 231 using a simple ppapi_main function), and two new examples that demonstrate how 232 to use the nacl_mounts and ppapi_main libraries.</p> 233 <section id="id6"> 234 <h3 id="id6">Build tools and toolchains</h3> 235 <ul class="small-gap"> 236 <li><p class="first">The SDK includes a new toolchain to build Native Client executables (.nexe 237 files) for <strong>ARM devices</strong>.</p> 238 <ul class="small-gap"> 239 <li>Currently the ARM toolchain can only be used to compile modules that use 240 the <a class="reference internal" href="/native-client/devguide/devcycle/dynamic-loading.html#c-libraries"><em>newlib C library</em></a>. You cannot use the ARM toolchain 241 to compile modules that use the glibc library.</li> 242 <li>The ARM toolchain is in the directory 243 <code>pepper_25/toolchain/<host>_arm_newlib</code>. The bin subdirectory contains 244 the compiler (<code>arm-nacl-gcc</code>), the linker (<code>arm-nacl-g++</code>), and the 245 other tools in the toolchain.</li> 246 <li>Take a look at the <code>hello_world</code> example to see how to use the ARM 247 toolchain. Go to <code>examples/hello_world</code> and run <code>make</code>. When the build 248 finishes, the newlib/Debug and newlib/Release subdirectories will contain 249 .nexe files for the x86-32, x86-64, and ARM target architecutes, and a 250 Native Client manifest (.nmf file) that references those three .nexe files.</li> 251 </ul> 252 </li> 253 <li>The simple web server included in the SDK, <code>httpd.py</code>, has been moved from 254 the <code>examples/</code> directory to the <code>tools/</code> directory. On Windows, you can 255 run <code>httpd.cmd</code> (in the <code>examples/</code> directory) to start the server.</li> 256 </ul> 257 </section><section id="ppapi"> 258 <h3 id="ppapi">PPAPI</h3> 259 <p>Pepper 25 includes two new APIs:</p> 260 <ul class="small-gap"> 261 <li>The <a class="reference external" href="/native-client/pepper_stable/c/struct_p_p_b___console__1__0">Console API</a> lets your 262 module log messages to the JavaScript console in the Chrome browser.</li> 263 <li>The <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_message_loop">MessageLoop</a> API lets your 264 module make PPAPI calls on a background thread. Once you’ve created a 265 message loop resource, attached it to a thread, and run it, you can post work 266 to the thread, including completion callbacks for asynchronous operations. 267 For a C++ example of how to use the MessageLoop API, see 268 <code>pepper_25/include/ppapi/utility/threading/simple_thread.h</code>. Note that you 269 cannot make asynchronous PPAPI calls on a background thread without creating 270 and using a message loop.</li> 271 </ul> 272 </section><section id="id7"> 273 <h3 id="id7">Libraries</h3> 274 <p>The SDK includes two new libraries:</p> 275 <ul class="small-gap"> 276 <li><p class="first">The <strong>nacl_mounts</strong> library provides a virtual file system that your module 277 can “mount” in a given directory tree. The file system can be one of several 278 types:</p> 279 <ul class="small-gap"> 280 <li>“memfs” is an in-memory file system,</li> 281 <li>“dev” is a file system with various utility nodes (e.g., <code>/dev/null</code>, 282 <code>/dev/console[0-3]</code>, <code>/dev/tty</code>), and</li> 283 <li>“html5fs” is a persistent file system.</li> 284 </ul> 285 <p>Once you’ve mounted a file system in your module, you can use standard C 286 library file operations: fopen, fread, fwrite, fseek, and fclose. How those 287 operations are performed depends on the type of file system (e.g., for 288 html5fs, the operations are performed using the Pepper FileIO API). For a 289 list of the types of file systems you can mount, see 290 include/nacl_mounts/nacl_mounts.h. For an example of how to use nacl_mounts, 291 see examples/hello_nacl_mounts. Note that html5fs is subject to the same 292 constraints as persistent <a class="reference internal" href="/native-client/devguide/coding/file-io.html#devguide-coding-fileio"><em>local file IO</em></a> in 293 Chrome (for example, prior to using an html5fs file system, you must <a class="reference external" href="enabling_file_access">enable 294 local file IO</a>).</p> 295 </li> 296 <li>The <strong>ppapi_main</strong> library simplifies the creation of a NaCl module by 297 providing a familiar C programming environment. With this library, your 298 module can have a simple entry point called ppapi_main(), which is similar to 299 the standard C main() function, complete with argc and argv[] parameters. 300 Your module can also use standard C functions such as printf(), fopen(), and 301 fwrite(). For details see include/ppapi_main/ppapi_main.h. For an example of 302 how to use ppapi_main, see examples/hello_world_stdio.</li> 303 </ul> 304 <p>Header files for the new libraries are in the <code>include/</code> directory, source 305 files are in the <code>src/</code> directory, and compiled libraries are in the <code>lib/</code> 306 directory.</p> 307 </section><section id="id8"> 308 <h3 id="id8">Examples</h3> 309 <ul class="small-gap"> 310 <li><p class="first">The SDK includes two new examples:</p> 311 <ul class="small-gap"> 312 <li><strong>hello_nacl_mounts</strong> illustrates how to use standard C library file 313 operations in a Native Client module through the use of the nacl_mounts 314 library.</li> 315 <li><strong>hello_world_stdio</strong> illustrates how to implement a Native Client module 316 with a ppapi_main() function, and how to write to STDOUT and STDERR in a 317 module, through the use of the nacl_mounts and ppapi_main libraries. This 318 example makes it easy for new users to get started with Native Client by 319 letting them start making changes in a familiar C environment.</li> 320 </ul> 321 </li> 322 <li><p class="first">With a few exceptions, the Makefile for each example now builds the following 323 versions of each example:</p> 324 <ul class="small-gap"> 325 <li>glibc toolchain: 32-bit and 64-bit .nexes for the x86 target architecture</li> 326 <li>newlib toolchain: 32-bit and 64-bit .nexes for the x86 target architecture, 327 and ARM .nexe for the ARM architecture</li> 328 <li>pnacl toolchain: .pexe (which is subsequently tranlsated to .nexes for the 329 x86-32, x86-64, and ARM architectures)</li> 330 <li>hosted toolchain: .so or .dll (to be executed as a Pepper plug-in in 331 Chrome)</li> 332 </ul> 333 </li> 334 <li>Additionally, each version is built in both a Debug and a Release 335 configuration.</li> 336 <li>The Makefile for each example includes two new targets: <code>make RUN</code> and 337 <code>make LAUNCH</code>. These targets, which are interchangeable, launch a local 338 server and an instance of Chrome to run an example. When the instance of 339 Chrome is closed, the local server is shut down as well.</li> 340 <li>The hello_world_stdio example includes a simplified Makefile that only lists 341 source dependencies, and invokes the build rules in a separate file 342 (common.mk).</li> 343 </ul> 344 </section></section><section id="pepper-24-5-december-2012"> 345 <h2 id="pepper-24-5-december-2012">Pepper 24 (5 December 2012)</h2> 346 <p>The Pepper 24 bundle features a new, experimental toolchain called PNaCl (short 347 for “Portable Native Client”), a new library (pthreads-win32) for the Windows 348 SDK, and an expanded list of attributes for Pepper 3D contexts that lets 349 applications specify a GPU preference for low power or performance.</p> 350 <section id="id9"> 351 <h3 id="id9">Build tools and toolchains</h3> 352 <ul class="small-gap"> 353 <li>The SDK includes a new, experimental toolchain called <a class="reference external" href="http://nativeclient.googlecode.com/svn/data/site/pnacl.pdf">PNaCl</a> (pronounced 354 “pinnacle”). The PNaCl toolchain produces architecture-independent executable 355 files (.pexe files). Chrome doesn’t yet support .pexe files directly, but if 356 you want to experiment with this early preview of PNaCl, the toolchain 357 includes a tool to translate .pexe files into architecture-specific .nexe 358 files. Take a look at the <code>hello_world</code> example to see how to build a .pexe 359 file and translate it into multiple .nexe files. Note that PNaCl is currently 360 restricted to the newlib C standard library if your application uses glibc, 361 you can’t build it with PNaCl.</li> 362 <li>The <code>create_nmf.py</code> script uses ELF headers (rather than file names) to 363 determine the architecture of .nexe files. That means you can change the 364 names of your .nexe files and <code>create_nmf.py</code> will still be able to 365 generate the appropriate Native Client manifest file for your application.</li> 366 </ul> 367 </section><section id="id11"> 368 <h3 id="id11">Examples</h3> 369 <ul class="small-gap"> 370 <li>The SDK examples now build with four toolchains: the glibc and newlib 371 toolchains, the experimental PNaCl toolchain, and the hosted toolchain on 372 your development machine. Within each toolchain build, each example also 373 builds both a debug and a release version.</li> 374 <li>The example Makefiles use dependency (.d) files to enable incremental builds.</li> 375 <li>The pong example has been cleaned up and modified to run more smoothly. The 376 drawing function is now set up as the Flush() callback, which allows 2D 377 drawing to occur as quickly as possible.</li> 378 </ul> 379 </section><section id="id12"> 380 <h3 id="id12">PPAPI</h3> 381 <ul class="small-gap"> 382 <li>When creating a 3D rendering context, the <a class="reference external" href="/native-client/pepper_stable/c/group___enums#ga7df48e1c55f6401beea2a1b9c07967e8">attribute list</a> 383 for the context can specify whether to prefer low power or performance for 384 the GPU. Contexts with a low power preference may be created on an integrated 385 GPU; contexts with a performance preference may be created on a discrete GPU.</li> 386 </ul> 387 </section><section id="windows-sdk"> 388 <h3 id="windows-sdk">Windows SDK</h3> 389 <ul class="small-gap"> 390 <li>The Windows SDK includes the pthreads-win32 library to assist in porting from 391 win32 code. You can use this library when developing your module as a Pepper 392 plug-in (.dll). See pepper_24/include/win/pthread.h and 393 pepper_24/src/pthread/README for additional information.</li> 394 <li>The update utility naclsdk.bat works when it is run from a path with spaces.</li> 395 </ul> 396 </section></section><section id="pepper-23-15-october-2012"> 397 <h2 id="pepper-23-15-october-2012">Pepper 23 (15 October 2012)</h2> 398 <p>The Pepper 23 bundle includes support for the nacl-gdb debugger on Mac and 399 32-bit Windows, resources to enable hosted development on Linux, and changes to 400 make the SDK examples compliant with version 2 of the Chrome Web Store manifest 401 file format.</p> 402 <section id="tools"> 403 <h3 id="tools">Tools</h3> 404 <ul class="small-gap"> 405 <li>The <a class="reference internal" href="/native-client/devguide/devcycle/debugging.html#using-gdb"><em>nacl-gdb debugger</em></a> now works on all systems (Mac, 406 Windows, and Linux).</li> 407 <li>The output of the SDK update utility has been simplified. When you run the 408 command <code>naclsdk list</code>, the utility displays one line for each available 409 bundle, annotated with an “<code>I</code>” if the bundle is already installed on your 410 system, and a “<code>*</code>” if the bundle has an update available. To see full 411 information about a bundle, use the command <code>naclsdk info <bundle></code> (for 412 example, <code>naclsdk info pepper_28</code>).</li> 413 </ul> 414 </section><section id="linux-sdk"> 415 <h3 id="linux-sdk">Linux SDK</h3> 416 <ul class="small-gap"> 417 <li><p class="first">Developers using the Linux SDK now have resources, including pre-built 418 libraries and example Makefiles, that make it easier to <strong>build a module as a 419 Pepper plugin</strong> (sometimes called a “trusted” or “in-process” plugin) using 420 the native C/C++ compiler on their development system. In essence this makes 421 developing a Native Client module a two-step process:</p> 422 <ol class="arabic simple"> 423 <li>Build the module into a shared library (.so file) using your system’s 424 C/C++ compiler. Test and debug the .so file using the tools in your normal 425 development environment.</li> 426 <li>Build the module into a .nexe file using the compiler from one of the 427 Native Client toolchains in the SDK (nacl-gcc or nacl-g++). Test and debug 428 the .nexe file using nacl-gdb.</li> 429 </ol> 430 <p>This two step development process has many benefitsin particular, you can 431 use the compilers, debuggers, profilers, and other tools that you’re already 432 familiar with. But there are a few potential issues to keep in mind:</p> 433 <ul class="small-gap"> 434 <li>Chrome uses different threading models for trusted plugins and Native 435 Client modules.</li> 436 <li>Certain operations such as platform-specific library calls and system calls 437 may succeed during trusted development, but fail in Native Client.</li> 438 </ul> 439 <p>Here are the resources you can use to build your module into a Pepper plugin:</p> 440 <ul class="small-gap"> 441 <li>header files are in <code>pepper_23/include</code></li> 442 <li>source files are in <code>pepper_23/src</code></li> 443 <li>pre-built libraries are in <code>pepper_23/lib</code></li> 444 </ul> 445 <p>You can now build and run most of the examples in the SDK as Pepper plugins.</p> 446 <ul class="small-gap"> 447 <li>Look at the example Makefiles or run <code>make</code> in the example directories to 448 see the commands and flags used to build modules as Pepper plugins.</li> 449 <li>Run <code>make LAUNCH</code> in the example directories to see how to use the 450 <code>--register-pepper-plugins</code> argument to load a Pepper plugin in Chrome. 451 Note that you must set the <code>CHROME_PATH</code> environment variable and start a 452 <a class="reference internal" href="/native-client/devguide/devcycle/running.html#web-server"><em>local server</em></a> prior to running this command.</li> 453 </ul> 454 </li> 455 </ul> 456 </section><section id="id13"> 457 <h3 id="id13">Examples</h3> 458 <ul class="small-gap"> 459 <li>On Linux and Windows systems, most of the examples now build with three 460 toolchains: the Native Client glibc and newlib toolchains, and the native 461 toolchain on the host system. Modules built with the native toolchain on the 462 host system can only run as Pepper plugins.</li> 463 <li>All examples in the SDK now comply with version 2 of the Chrome Web Store 464 <a class="reference external" href="/extensions/manifest">manifest file format</a>. By default, 465 applications that use version 2 of the manifest file format apply a strict 466 <a class="reference external" href="/extensions/contentSecurityPolicy">content security policy</a>, which 467 includes a restriction against inline JavaScript. This restriction prohibits 468 both inline <code><script></code> blocks and inline event handlers (e.g., <code><button 469 onclick="..."></code>). See <a class="reference external" href="/extensions/manifestVersion">Manifest Version</a> for 470 a list of changes between version 1 and version 2 of the manifest file 471 format, and a support schedule for applications that use version 1.</li> 472 </ul> 473 </section><section id="id14"> 474 <h3 id="id14">PPAPI</h3> 475 <ul class="small-gap"> 476 <li><a class="reference external" href="/native-client/pepper_stable/c/group___enums#ga21b811ac0484a214a8751aa3e1c959d9">PP_InputEvent_Modifier</a> 477 has two new enum values (_ISLEFT and _ISRIGHT).</li> 478 <li>The memory leak in the <a class="reference external" href="/native-client/pepper_stable/c/struct_p_p_b___web_socket__1__0">WebSocket</a> API has 479 been fixed.</li> 480 </ul> 481 </section></section><section id="pepper-22-22-august-2012"> 482 <h2 id="pepper-22-22-august-2012">Pepper 22 (22 August 2012)</h2> 483 <p>The Pepper 22 bundle includes a <strong>command-line debugger</strong>, resources to enable 484 <strong>hosted development on Windows</strong>, and changes to the example Makefiles (each 485 example now builds both a debug and a release version).</p> 486 <section id="id15"> 487 <h3 id="id15">Tools</h3> 488 <ul class="small-gap"> 489 <li>The SDK now includes a <strong>command-line debugger</strong> that you can use to debug 490 Native Client modules. See <a class="reference internal" href="/native-client/devguide/devcycle/debugging.html#devcycle-debugging"><em>Debugging with nacl-gdb</em></a> for instructions on how to use this debugger. For now, 491 nacl-gdb only works on 64-bit Windows, 64-bit Linux, and 32-bit Linux 492 systems. Support for Mac and 32-bit Windows systems will be added soon.</li> 493 </ul> 494 </section><section id="id16"> 495 <h3 id="id16">Windows SDK</h3> 496 <ul class="small-gap"> 497 <li><p class="first">Developers using the Windows SDK can now <strong>build a module as a Pepper 498 plugin</strong> (sometimes called a “trusted” or “in-process” plugin) using the 499 native C/C++ compiler on their development system. In essence this makes 500 developing a Native Client module a two-step process:</p> 501 <ol class="arabic simple"> 502 <li>Build the module into a DLL using your system’s C/C++ compiler. Test and 503 debug the DLL using the tools in your normal development environment.</li> 504 <li>Build the module into a .nexe using the compiler from one of the Native 505 Client toolchains in the SDK (nacl-gcc or nacl-g++). Test and debug the 506 .nexe using nacl-gdb.</li> 507 </ol> 508 <p>This two step development process has many benefitsin particular, you can 509 use the compilers, debuggers, profilers, and other tools that you’re already 510 familiar with. But there are a few potential issues to keep in mind:</p> 511 <ul class="small-gap"> 512 <li>Some libraries that are commonly used with Native Client may not build 513 easily on Windows.</li> 514 <li>You may need to put in extra effort to get source code to compile with 515 multiple compilers, e.g., Microsoft Visual Studio and GCC.</li> 516 <li>Chrome uses different threading models for trusted plugins and Native 517 Client modules.</li> 518 <li>Certain operations such as platform-specific library calls and system calls 519 may succeed during trusted development, but fail in Native Client.</li> 520 </ul> 521 <p>Here are the resources you can use to build your module into a DLL:</p> 522 <ul class="small-gap"> 523 <li>header files are in <code>pepper_22\include</code></li> 524 <li>source files are in <code>pepper_22\src</code></li> 525 <li>pre-built libraries are in <code>pepper_22\lib</code></li> 526 </ul> 527 </li> 528 <li>A Visual Studio add-in will be available in the near future with 529 configurations that include platforms for both Pepper plugins and NaCl 530 modules.</li> 531 </ul> 532 <aside class="note"> 533 <strong>Note:</strong> It’s also possible to build a module as a trusted plugin on Mac and 534 Linux systems, but doing so requires more work because the SDK does not yet 535 include the above resources (library source files and pre-built libraries) 536 for Mac and Linux systems. To build and debug a trusted plugin on Mac and 537 Linux systems, you need to <a class="reference external" href="http://dev.chromium.org/developers/how-tos/get-the-code">get the Chromium code</a> and then follow 538 the <a class="reference external" href="http://www.chromium.org/nativeclient/how-tos/debugging-documentation/debugging-a-trusted-plugin/trusted-debugging-on-mac">Mac instructions</a> 539 or <a class="reference external" href="http://www.chromium.org/nativeclient/how-tos/debugging-documentation/debugging-a-trusted-plugin/debugging-a-trusted-plugin-on-linux">Linux instructions</a>. 540 In the future, the SDK will include resources for hosted development on Mac 541 and Linux as well as Windows. 542 </aside> 543 </section><section id="id17"> 544 <h3 id="id17">Examples</h3> 545 <ul class="small-gap"> 546 <li>Each example in the SDK now builds both a debug and a release version. As 547 before, most examples also build newlib and glibc versions, which means that 548 there are now four versions for each example. Take a look at the Makefiles in 549 the examples to see the compiler flags that are used for debug and release 550 versions. For a description of those flags, see <a class="reference internal" href="/native-client/devguide/devcycle/building.html#compile-flags"><em>Compile flags for 551 different development scenarios</em></a>.</li> 552 <li>Comments have been added to common.js, which is used in all the examples. The 553 JavaScript in common.js inserts an <embed> element that loads the NaCl module 554 in each example’s web page, attaches event listeners to monitor the loading 555 of the module, and implements handleMessage() to respond to messages sent 556 from the NaCl module to the JavaScript side of the application</li> 557 </ul> 558 </section><section id="id18"> 559 <h3 id="id18">PPAPI</h3> 560 <ul class="small-gap"> 561 <li>The <code>CompletionCallbackFactory</code> class template now takes a thread traits 562 class as its second parameter. For details see the <a class="reference external" href="/native-client/pepper_stable/cpp/classpp_1_1_completion_callback_factory#details">CompletionCallbackFactory 563 class template reference</a>.</li> 564 </ul> 565 </section></section></section> 566 567 {{/partials.standard_nacl_article}} 568