Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: native_client_sdk/src/doc/_developer.chrome.com_generated/sdk/release-notes.html

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

Powered by Google App Engine
This is Rietveld 408576698