| 1 | <!doctype html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>Zig Documentation</title> |
| 7 | <link rel="icon" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTMgMTQwIj48ZyBmaWxsPSIjRjdBNDFEIj48Zz48cG9seWdvbiBwb2ludHM9IjQ2LDIyIDI4LDQ0IDE5LDMwIi8+PHBvbHlnb24gcG9pbnRzPSI0NiwyMiAzMywzMyAyOCw0NCAyMiw0NCAyMiw5NSAzMSw5NSAyMCwxMDAgMTIsMTE3IDAsMTE3IDAsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMzEsOTUgMTIsMTE3IDQsMTA2Ii8+PC9nPjxnPjxwb2x5Z29uIHBvaW50cz0iNTYsMjIgNjIsMzYgMzcsNDQiLz48cG9seWdvbiBwb2ludHM9IjU2LDIyIDExMSwyMiAxMTEsNDQgMzcsNDQgNTYsMzIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTE2LDk1IDk3LDExNyA5MCwxMDQiLz48cG9seWdvbiBwb2ludHM9IjExNiw5NSAxMDAsMTA0IDk3LDExNyA0MiwxMTcgNDIsOTUiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTUwLDAgNTIsMTE3IDMsMTQwIDEwMSwyMiIvPjwvZz48Zz48cG9seWdvbiBwb2ludHM9IjE0MSwyMiAxNDAsNDAgMTIyLDQ1Ii8+PHBvbHlnb24gcG9pbnRzPSIxNTMsMjIgMTUzLDExNyAxMDYsMTE3IDEyMCwxMDUgMTI1LDk1IDEzMSw5NSAxMzEsNDUgMTIyLDQ1IDEzMiwzNiAxNDEsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTI1LDk1IDEzMCwxMTAgMTA2LDExNyIvPjwvZz48L2c+PC9zdmc+"> |
| 8 | <link rel="preload" as="fetch" type="application/wasm" crossorigin href="main.wasm"> |
| 9 | <link rel="preload" as="fetch" type="application/x-tar" crossorigin href="sources.tar"> |
| 10 | <style type="text/css"> |
| 11 | *, *::before, *::after { |
| 12 | box-sizing: border-box; |
| 13 | } |
| 14 | body { |
| 15 | font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif; |
| 16 | color: #000000; |
| 17 | } |
| 18 | .hidden { |
| 19 | display: none; |
| 20 | } |
| 21 | table { |
| 22 | width: 100%; |
| 23 | } |
| 24 | a { |
| 25 | color: #2A6286; |
| 26 | } |
| 27 | pre{ |
| 28 | font-family:"Source Code Pro",monospace; |
| 29 | font-size:1em; |
| 30 | background-color:#F5F5F5; |
| 31 | padding: 1em; |
| 32 | margin: 0; |
| 33 | overflow-x: auto; |
| 34 | } |
| 35 | :not(pre) > code { |
| 36 | white-space: break-spaces; |
| 37 | } |
| 38 | code { |
| 39 | font-family:"Source Code Pro",monospace; |
| 40 | font-size: 0.9em; |
| 41 | } |
| 42 | code a { |
| 43 | color: #000000; |
| 44 | } |
| 45 | .source-code { |
| 46 | display: grid; |
| 47 | grid-template-columns: auto 1fr; |
| 48 | align-items: start; |
| 49 | } |
| 50 | .source-line-numbers pre { |
| 51 | text-align: right; |
| 52 | color: #666; |
| 53 | } |
| 54 | #listFields > div, #listParams > div { |
| 55 | margin-bottom: 1em; |
| 56 | } |
| 57 | #hdrName a { |
| 58 | font-size: 0.7em; |
| 59 | padding-left: 1em; |
| 60 | } |
| 61 | .fieldDocs { |
| 62 | border: 1px solid #F5F5F5; |
| 63 | border-top: 0px; |
| 64 | padding: 1px 1em; |
| 65 | } |
| 66 | |
| 67 | #logo { |
| 68 | width: 8em; |
| 69 | padding: 0.5em 1em; |
| 70 | } |
| 71 | |
| 72 | #navWrap { |
| 73 | width: -moz-available; |
| 74 | width: -webkit-fill-available; |
| 75 | width: stretch; |
| 76 | margin-left: 11em; |
| 77 | } |
| 78 | |
| 79 | #search { |
| 80 | width: 100%; |
| 81 | } |
| 82 | |
| 83 | nav { |
| 84 | width: 10em; |
| 85 | float: left; |
| 86 | } |
| 87 | nav h2 { |
| 88 | font-size: 1.2em; |
| 89 | text-decoration: underline; |
| 90 | margin: 0; |
| 91 | padding: 0.5em 0; |
| 92 | text-align: center; |
| 93 | } |
| 94 | nav p { |
| 95 | margin: 0; |
| 96 | padding: 0; |
| 97 | text-align: center; |
| 98 | } |
| 99 | section { |
| 100 | clear: both; |
| 101 | padding-top: 1em; |
| 102 | } |
| 103 | section h1 { |
| 104 | border-bottom: 1px dashed; |
| 105 | margin: 0 0; |
| 106 | } |
| 107 | section h2 { |
| 108 | font-size: 1.3em; |
| 109 | margin: 0.5em 0; |
| 110 | padding: 0; |
| 111 | border-bottom: 1px solid; |
| 112 | } |
| 113 | #listNav { |
| 114 | list-style-type: none; |
| 115 | margin: 0.5em 0 0 0; |
| 116 | padding: 0; |
| 117 | overflow: hidden; |
| 118 | background-color: #f1f1f1; |
| 119 | } |
| 120 | #listNav li { |
| 121 | float:left; |
| 122 | } |
| 123 | #listNav li a { |
| 124 | display: block; |
| 125 | color: #000; |
| 126 | text-align: center; |
| 127 | padding: .5em .8em; |
| 128 | text-decoration: none; |
| 129 | } |
| 130 | #listNav li a:hover { |
| 131 | background-color: #555; |
| 132 | color: #fff; |
| 133 | } |
| 134 | #listNav li a.active { |
| 135 | background-color: #FFBB4D; |
| 136 | color: #000; |
| 137 | } |
| 138 | |
| 139 | #helpDialog { |
| 140 | width: 21em; |
| 141 | height: 21em; |
| 142 | position: fixed; |
| 143 | top: 0; |
| 144 | left: 0; |
| 145 | background-color: #333; |
| 146 | color: #fff; |
| 147 | border: 1px solid #fff; |
| 148 | } |
| 149 | #helpDialog h1 { |
| 150 | text-align: center; |
| 151 | font-size: 1.5em; |
| 152 | } |
| 153 | #helpDialog dt, #helpDialog dd { |
| 154 | display: inline; |
| 155 | margin: 0 0.2em; |
| 156 | } |
| 157 | kbd { |
| 158 | color: #000; |
| 159 | background-color: #fafbfc; |
| 160 | border-color: #d1d5da; |
| 161 | border-bottom-color: #c6cbd1; |
| 162 | box-shadow-color: #c6cbd1; |
| 163 | display: inline-block; |
| 164 | padding: 0.3em 0.2em; |
| 165 | font: 1.2em monospace; |
| 166 | line-height: 0.8em; |
| 167 | vertical-align: middle; |
| 168 | border: solid 1px; |
| 169 | border-radius: 3px; |
| 170 | box-shadow: inset 0 -1px 0; |
| 171 | cursor: default; |
| 172 | } |
| 173 | |
| 174 | #errors { |
| 175 | background-color: #faa; |
| 176 | position: fixed; |
| 177 | left: 0; |
| 178 | bottom: 0; |
| 179 | width: 100%; |
| 180 | max-height: min(20em, 50vh); |
| 181 | padding: 0.5em; |
| 182 | overflow: auto; |
| 183 | } |
| 184 | #errors h1 { |
| 185 | font-size: 1.5em; |
| 186 | } |
| 187 | #errors pre { |
| 188 | background-color: #fcc; |
| 189 | } |
| 190 | |
| 191 | #listSearchResults li.selected { |
| 192 | background-color: #93e196; |
| 193 | } |
| 194 | |
| 195 | #tableFnErrors dt { |
| 196 | font-weight: bold; |
| 197 | } |
| 198 | |
| 199 | dl > div { |
| 200 | padding: 0.5em; |
| 201 | border: 1px solid #c0c0c0; |
| 202 | margin-top: 0.5em; |
| 203 | } |
| 204 | |
| 205 | td, th { |
| 206 | text-align: unset; |
| 207 | vertical-align: top; |
| 208 | margin: 0; |
| 209 | padding: 0.5em; |
| 210 | max-width: 20em; |
| 211 | text-overflow: ellipsis; |
| 212 | overflow-x: hidden; |
| 213 | } |
| 214 | |
| 215 | ul.columns { |
| 216 | column-width: 20em; |
| 217 | } |
| 218 | |
| 219 | .tok-kw { |
| 220 | color: #333; |
| 221 | font-weight: bold; |
| 222 | } |
| 223 | .tok-str { |
| 224 | color: #d14; |
| 225 | } |
| 226 | .tok-builtin { |
| 227 | color: #0086b3; |
| 228 | } |
| 229 | .tok-comment { |
| 230 | color: #777; |
| 231 | font-style: italic; |
| 232 | } |
| 233 | .tok-fn { |
| 234 | color: #900; |
| 235 | font-weight: bold; |
| 236 | } |
| 237 | .tok-null { |
| 238 | color: #008080; |
| 239 | } |
| 240 | .tok-number { |
| 241 | color: #008080; |
| 242 | } |
| 243 | .tok-type { |
| 244 | color: #458; |
| 245 | font-weight: bold; |
| 246 | } |
| 247 | |
| 248 | @media (prefers-color-scheme: dark) { |
| 249 | body { |
| 250 | background-color: #111; |
| 251 | color: #bbb; |
| 252 | } |
| 253 | pre { |
| 254 | background-color: #222; |
| 255 | color: #ccc; |
| 256 | } |
| 257 | a { |
| 258 | color: #88f; |
| 259 | } |
| 260 | code a { |
| 261 | color: #ccc; |
| 262 | } |
| 263 | .fieldDocs { |
| 264 | border-color:#2A2A2A; |
| 265 | } |
| 266 | #listNav { |
| 267 | background-color: #333; |
| 268 | } |
| 269 | #listNav li a { |
| 270 | color: #fff; |
| 271 | } |
| 272 | #listNav li a:hover { |
| 273 | background-color: #555; |
| 274 | color: #fff; |
| 275 | } |
| 276 | #listNav li a.active { |
| 277 | background-color: #FFBB4D; |
| 278 | color: #000; |
| 279 | } |
| 280 | #listSearchResults li.selected { |
| 281 | background-color: #000; |
| 282 | } |
| 283 | #listSearchResults li.selected a { |
| 284 | color: #fff; |
| 285 | } |
| 286 | #errors { |
| 287 | background-color: #800; |
| 288 | color: #fff; |
| 289 | } |
| 290 | #errors pre { |
| 291 | background-color: #a00; |
| 292 | color: #fff; |
| 293 | } |
| 294 | dl > div { |
| 295 | border-color: #373737; |
| 296 | } |
| 297 | .tok-kw { |
| 298 | color: #eee; |
| 299 | } |
| 300 | .tok-str { |
| 301 | color: #2e5; |
| 302 | } |
| 303 | .tok-builtin { |
| 304 | color: #ff894c; |
| 305 | } |
| 306 | .tok-comment { |
| 307 | color: #aa7; |
| 308 | } |
| 309 | .tok-fn { |
| 310 | color: #B1A0F8; |
| 311 | } |
| 312 | .tok-null { |
| 313 | color: #ff8080; |
| 314 | } |
| 315 | .tok-number { |
| 316 | color: #ff8080; |
| 317 | } |
| 318 | .tok-type { |
| 319 | color: #68f; |
| 320 | } |
| 321 | } |
| 322 | </style> |
| 323 | </head> |
| 324 | <body> |
| 325 | <nav> |
| 326 | <a class="logo" href="#"> |
| 327 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 140"> |
| 328 | <g fill="#F7A41D"> |
| 329 | <g> |
| 330 | <polygon points="46,22 28,44 19,30"/> |
| 331 | <polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"/> |
| 332 | <polygon points="31,95 12,117 4,106"/> |
| 333 | </g> |
| 334 | <g> |
| 335 | <polygon points="56,22 62,36 37,44"/> |
| 336 | <polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"/> |
| 337 | <polygon points="116,95 97,117 90,104"/> |
| 338 | <polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"/> |
| 339 | <polygon points="150,0 52,117 3,140 101,22"/> |
| 340 | </g> |
| 341 | <g> |
| 342 | <polygon points="141,22 140,40 122,45"/> |
| 343 | <polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"/> |
| 344 | <polygon points="125,95 130,110 106,117"/> |
| 345 | </g> |
| 346 | </g> |
| 347 | <style> |
| 348 | #text { fill: #121212 } |
| 349 | @media (prefers-color-scheme: dark) { #text { fill: #f2f2f2 } } |
| 350 | </style> |
| 351 | <g id="text"> |
| 352 | <g> |
| 353 | <polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"/> |
| 354 | <polygon points="260,37 207,99 207,103 176,103 229,40 229,37"/> |
| 355 | <polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"/> |
| 356 | </g> |
| 357 | <rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"/> |
| 358 | <g> |
| 359 | <polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"/> |
| 360 | <polygon points="360,68 376,81 346,67"/> |
| 361 | <path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 c5.7,0,12.8-2.3,19-5.5L394,106z"/> |
| 362 | </g> |
| 363 | </g> |
| 364 | </svg> |
| 365 | </a> |
| 366 | </nav> |
| 367 | <div id="navWrap"> |
| 368 | <input type="search" id="search" autocomplete="off" spellcheck="false" placeholder="`s` to search, `?` to see more options"> |
| 369 | <div id="sectNav" class="hidden"><ul id="listNav"></ul></div> |
| 370 | </div> |
| 371 | <section> |
| 372 | <p id="status">Loading...</p> |
| 373 | <h1 id="hdrName" class="hidden"><span></span><a href="#">[src]</a></h1> |
| 374 | <div id="fnProto" class="hidden"> |
| 375 | <pre><code id="fnProtoCode"></code></pre> |
| 376 | </div> |
| 377 | <div id="tldDocs" class="hidden"></div> |
| 378 | <div id="sectParams" class="hidden"> |
| 379 | <h2>Parameters</h2> |
| 380 | <div id="listParams"> |
| 381 | </div> |
| 382 | </div> |
| 383 | <div id="sectFnErrors" class="hidden"> |
| 384 | <h2>Errors</h2> |
| 385 | <div id="fnErrorsAnyError"> |
| 386 | <p><span class="tok-type">anyerror</span> means the error set is known only at runtime.</p> |
| 387 | </div> |
| 388 | <div id="tableFnErrors"><dl id="listFnErrors"></dl></div> |
| 389 | </div> |
| 390 | <div id="sectSearchResults" class="hidden"> |
| 391 | <h2>Search Results</h2> |
| 392 | <ul id="listSearchResults"></ul> |
| 393 | </div> |
| 394 | <div id="sectSearchNoResults" class="hidden"> |
| 395 | <h2>No Results Found</h2> |
| 396 | <p>Press escape to exit search and then '?' to see more options.</p> |
| 397 | </div> |
| 398 | <div id="sectFields" class="hidden"> |
| 399 | <h2>Fields</h2> |
| 400 | <div id="listFields"> |
| 401 | </div> |
| 402 | </div> |
| 403 | <div id="sectTypes" class="hidden"> |
| 404 | <h2>Types</h2> |
| 405 | <ul id="listTypes" class="columns"> |
| 406 | </ul> |
| 407 | </div> |
| 408 | <div id="sectNamespaces" class="hidden"> |
| 409 | <h2>Namespaces</h2> |
| 410 | <ul id="listNamespaces" class="columns"> |
| 411 | </ul> |
| 412 | </div> |
| 413 | <div id="sectGlobalVars" class="hidden"> |
| 414 | <h2>Global Variables</h2> |
| 415 | <table> |
| 416 | <tbody id="listGlobalVars"> |
| 417 | </tbody> |
| 418 | </table> |
| 419 | </div> |
| 420 | <div id="sectValues" class="hidden"> |
| 421 | <h2>Values</h2> |
| 422 | <table> |
| 423 | <tbody id="listValues"> |
| 424 | </tbody> |
| 425 | </table> |
| 426 | </div> |
| 427 | <div id="sectFns" class="hidden"> |
| 428 | <h2>Functions</h2> |
| 429 | <dl id="listFns"> |
| 430 | </dl> |
| 431 | </div> |
| 432 | <div id="sectErrSets" class="hidden"> |
| 433 | <h2>Error Sets</h2> |
| 434 | <ul id="listErrSets" class="columns"> |
| 435 | </ul> |
| 436 | </div> |
| 437 | <div id="sectDocTests" class="hidden"> |
| 438 | <h2>Example Usage</h2> |
| 439 | <pre><code id="docTestsCode"></code></pre> |
| 440 | </div> |
| 441 | <div id="sectSource" class="hidden"> |
| 442 | <h2>Source Code</h2> |
| 443 | <div class="source-code"> |
| 444 | <div class="source-line-numbers"> |
| 445 | <pre><code id="sourceLineNumbers"></code></pre> |
| 446 | </div> |
| 447 | <div class="source-text"> |
| 448 | <pre><code id="sourceText"></code></pre> |
| 449 | </div> |
| 450 | </div> |
| 451 | </div> |
| 452 | </section> |
| 453 | <div id="helpDialog" class="hidden"> |
| 454 | <h1>Keyboard Shortcuts</h1> |
| 455 | <dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd></dl> |
| 456 | <dl><dt><kbd>Esc</kbd></dt><dd>Clear focus; close this dialog</dd></dl> |
| 457 | <dl><dt><kbd>s</kbd></dt><dd>Focus the search field</dd></dl> |
| 458 | <dl><dt><kbd>u</kbd></dt><dd>Go to source code</dd></dl> |
| 459 | <dl><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd></dl> |
| 460 | <dl><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd></dl> |
| 461 | <dl><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd></dl> |
| 462 | </div> |
| 463 | <div id="errors" class="hidden"> |
| 464 | <h1>Errors</h1> |
| 465 | <pre id="errorsText"></pre> |
| 466 | </div> |
| 467 | <script src="main.js"></script> |
| 468 | </body> |
| 469 | </html> |
| 470 | |