OLD | NEW |
1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
2 | 2 |
3 <section id="native-client-manifest-nmf-format"> | 3 <section id="native-client-manifest-nmf-format"> |
4 <h1 id="native-client-manifest-nmf-format">Native Client Manifest (nmf) Format</
h1> | 4 <h1 id="native-client-manifest-nmf-format">Native Client Manifest (nmf) Format</
h1> |
5 <div class="contents local" id="contents" style="display: none"> | 5 <div class="contents local" id="contents" style="display: none"> |
6 <ul class="small-gap"> | 6 <ul class="small-gap"> |
7 <li><a class="reference internal" href="#overview" id="id1">Overview</a></li> | 7 <li><a class="reference internal" href="#overview" id="id1">Overview</a></li> |
8 <li><a class="reference internal" href="#field-summary" id="id2">Field summary</
a></li> | 8 <li><a class="reference internal" href="#field-summary" id="id2">Field summary</
a></li> |
9 <li><p class="first"><a class="reference internal" href="#field-details" id="id3
">Field details</a></p> | 9 <li><p class="first"><a class="reference internal" href="#field-details" id="id3
">Field details</a></p> |
10 <ul class="small-gap"> | 10 <ul class="small-gap"> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 <code>program</code> is the dynamic loader used to load the dynamic executable | 56 <code>program</code> is the dynamic loader used to load the dynamic executable |
57 and its dynamic libraries. See the <a class="reference internal" href="#nmf-url
-resolution"><em>semantics</em></a> | 57 and its dynamic libraries. See the <a class="reference internal" href="#nmf-url
-resolution"><em>semantics</em></a> |
58 section for the rules on URL resolution.</p> | 58 section for the rules on URL resolution.</p> |
59 <section id="example-of-a-program-for-portable-native-client"> | 59 <section id="example-of-a-program-for-portable-native-client"> |
60 <h4 id="example-of-a-program-for-portable-native-client">Example of a <code>prog
ram</code> for Portable Native Client:</h4> | 60 <h4 id="example-of-a-program-for-portable-native-client">Example of a <code>prog
ram</code> for Portable Native Client:</h4> |
61 <pre class="prettyprint"> | 61 <pre class="prettyprint"> |
62 { | 62 { |
63 "program": { | 63 "program": { |
64 "pnacl-translate": { | 64 "pnacl-translate": { |
65 // url is required | 65 // url is required |
66 "url": "url_to_my_pexe" | 66 "url": "url_to_my_pexe", |
| 67 |
| 68 // optlevel is optional |
| 69 "optlevel": 2 |
| 70 }, |
| 71 // pnacl-debug is optional |
| 72 "pnacl-debug": { |
| 73 // url is required |
| 74 "url": "url_to_my_bitcode_bc", |
67 | 75 |
68 // optlevel is optional | 76 // optlevel is optional |
69 "optlevel": 0 | 77 "optlevel": 0 |
70 } | 78 } |
71 } | 79 } |
72 } | 80 } |
73 </pre> | 81 </pre> |
74 <p>Portable Native Client applications can also specify an <code>optlevel</code>
field. | 82 <p>Portable Native Client applications can also specify an <code>optlevel</code>
field. |
75 The <code>optlevel</code> field is an optimization level <em>hint</em>, which is
a number | 83 The <code>optlevel</code> field is an optimization level <em>hint</em>, which is
a number |
76 (zero and higher). Higher numbers indicate more optimization effort. | 84 (zero and higher). Higher numbers indicate more optimization effort. |
77 Setting a higher optimization level will improve the application’s | 85 Setting a higher optimization level will improve the application’s |
78 performance, but it will also slow down the first load experience. | 86 performance, but it will also slow down the first load experience. |
79 The default is <code>optlevel</code> is currently <code>2</code>, and values hig
her | 87 The default is <code>optlevel</code> is currently <code>2</code>, and values hig
her |
80 than 2 are no different than 2. If compute speed is not as important | 88 than 2 are no different than 2. If compute speed is not as important |
81 as first load speed, an application could specify an <code>optlevel</code> | 89 as first load speed, an application could specify an <code>optlevel</code> |
82 of <code>0</code>. Note that <code>optlevel</code> is only a <em>hint</em>. In t
he future, the | 90 of <code>0</code>. Note that <code>optlevel</code> is only a <em>hint</em>. In t
he future, the |
83 Portable Native Client translator and runtime may <em>automatically</em> choose | 91 Portable Native Client translator and runtime may <em>automatically</em> choose |
84 an <code>optlevel</code> to best balance load time and application performance.<
/p> | 92 an <code>optlevel</code> to best balance load time and application performance.<
/p> |
| 93 <p>A <code>pnacl-debug</code> section can specify an unfinalized pnacl llvm bitc
ode file |
| 94 for debugging. The <code>url</code> provided in this section will be used when N
ative |
| 95 Client debugging is enabled with either the <code>--enable-nacl-debug</code> Chr
ome |
| 96 command line switch, or via <code>about://flags</code>.</p> |
85 </section><section id="example-of-a-program-for-statically-linked-native-client-
executables"> | 97 </section><section id="example-of-a-program-for-statically-linked-native-client-
executables"> |
86 <h4 id="example-of-a-program-for-statically-linked-native-client-executables">Ex
ample of a <code>program</code> for statically linked Native Client executables<
/h4> | 98 <h4 id="example-of-a-program-for-statically-linked-native-client-executables">Ex
ample of a <code>program</code> for statically linked Native Client executables<
/h4> |
87 <pre class="prettyprint"> | 99 <pre class="prettyprint"> |
88 { | 100 { |
89 "program": { | 101 "program": { |
90 // Required: at least one entry | 102 // Required: at least one entry |
91 // Add one of these for each architecture supported by the application. | 103 // Add one of these for each architecture supported by the application. |
92 "arm": { "url": "url_to_arm_nexe" }, | 104 "arm": { "url": "url_to_arm_nexe" }, |
93 "x86-32": { "url": "url_to_x86_32_nexe" }, | 105 "x86-32": { "url": "url_to_x86_32_nexe" }, |
94 "x86-64": { "url": "url_to_x86_64_nexe" } | 106 "x86-64": { "url": "url_to_x86_64_nexe" } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 inline with a data URI can help reduce the amount of network traffic | 240 inline with a data URI can help reduce the amount of network traffic |
229 required to load the Native Client application.</p> | 241 required to load the Native Client application.</p> |
230 </section><section id="url-resolution"> | 242 </section><section id="url-resolution"> |
231 <span id="nmf-url-resolution"></span><h3 id="url-resolution"><span id="nmf-url-r
esolution"></span>URL resolution</h3> | 243 <span id="nmf-url-resolution"></span><h3 id="url-resolution"><span id="nmf-url-r
esolution"></span>URL resolution</h3> |
232 <p>All URLs contained in a manifest are resolved relative to the URL of | 244 <p>All URLs contained in a manifest are resolved relative to the URL of |
233 the manifest. If the manifest was specified as a data URI, the URLs must | 245 the manifest. If the manifest was specified as a data URI, the URLs must |
234 all be absolute.</p> | 246 all be absolute.</p> |
235 </section></section></section> | 247 </section></section></section> |
236 | 248 |
237 {{/partials.standard_nacl_article}} | 249 {{/partials.standard_nacl_article}} |
OLD | NEW |