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