xref: /sqlite-3.40.0/ext/wasm/index.html (revision ac79fa1c)
1<!doctype html>
2<html lang="en-us">
3  <head>
4    <meta charset="utf-8">
5    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6    <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
7    <link rel="stylesheet" href="common/testing.css"/>
8    <title>sqlite3 WASM Testing Page Index</title>
9  </head>
10  <body>
11    <header id='titlebar'><span>sqlite3 WASM test pages</span></header>
12    <hr>
13    <div>Below is the list of test pages for the sqlite3 WASM
14      builds. All of them require that this directory have been
15      "make"d first. The intent is that <em>this</em> page be run
16      using:</div>
17    <blockquote><pre>althttpd -enable-sab -page index.html</pre></blockquote>
18    <div>and the individual tests be started in their own tab.
19      Warnings and Caveats:
20      <ul class='warning'>
21        <li>Some of these pages require that
22          the web server emit the so-called
23          <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a>
24          and
25          <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a>
26          headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the
27          <code>-enable-sab</code> flag for that.
28        </li>
29        <li>Any OPFS-related pages require very recent version of
30          Chrome or Chromium (v102 at least, possibly newer). OPFS
31          support in the other major browsers is pending. Development
32          and testing is currently done against a dev-channel release
33          of Chrome (v107 as of 2022-09-26).
34        </li>
35        <li>Whether or not WASMFS/OPFS support is enabled on any given
36          page may depend on build-time options which are <em>off by
37          default</em> because they currently (as of 2022-09-08) break
38          with Worker-based pages.
39        </li>
40      </ul>
41    </div>
42    <div>The tests and demos...
43      <ul id='test-list'>
44        <li>Core-most tests
45          <ul>
46            <li><a href='tester1.html'>tester1</a>: Core unit and
47              regression tests for the various APIs and surrounding
48              utility code.</li>
49            <li><a href='tester1-worker.html'>tester1-worker</a>: same thing
50            but running in a Worker.</li>
51          </ul>
52        </li>
53        <li>High-level apps and demos...
54          <ul>
55            <li><a href='fiddle/fiddle.html'>fiddle</a> is an HTML front-end
56              to a wasm build of the sqlite3 shell.</li>
57            <li><a href='demo-123.html'>demo-123</a> provides a
58              no-nonsense example of adding sqlite3 support to a web
59              page in the UI thread.</li>
60            <li><a href='demo-123-worker.html'>demo-123-worker</a> is
61              the same as <code>demo-123</code> but loads and runs
62              sqlite3 from a Worker thread.</li>
63            <li><a href='demo-kvvfs1.html'>demo-kvvfs1</a>: very basic
64              demo of using the key-value VFS for storing a persistent db
65              in JS <code>localStorage</code> or <code>sessionStorage</code>.</li>
66          </ul>
67        </li>
68        <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
69          <ul>
70            <li><a href='speedtest1.html'>speedtest1</a>: a main-thread WASM build of speedtest1.</li>
71            <li><a href='speedtest1-wasmfs.html?flags=--size,25'>speedtest1-wasmfs</a>: a variant of speedtest1 built solely for the wasmfs/opfs feature.</li>
72            <li><a href='speedtest1.html?vfs=kvvfs'>speedtest1-kvvfs</a>: speedtest1 with the kvvfs.</li>
73            <li><a href='speedtest1-worker.html?size=25'>speedtest1-worker</a>: an interactive Worker-thread variant of speedtest1.</li>
74            <li><a href='speedtest1-worker.html?vfs=opfs&size=25'>speedtest1-worker-opfs</a>: speedtest1-worker with the
75              OPFS VFS preselected and configured for a moderate workload.</li>
76          </ul>
77        </li>
78        <li>The obligatory "misc." category...
79          <ul>
80            <li><a href='testing2.html'>testing2</a>: Worker-based test of OO API #1.</li>
81            <li><a href='testing-worker1-promiser.html'>testing-worker1-promiser</a>:
82              tests for the Promise-based wrapper of the Worker-based API.</li>
83            <li><a href='batch-runner.html'>batch-runner</a>: runs batches of SQL exported from speedtest1.</li>
84            <li><a href='scratchpad-wasmfs-main.html'>scratchpad-wasmfs-main</a>:
85              experimenting with WASMFS/OPFS-based persistence. Maintenance
86              reminder: we cannot currently (2022-09-15) load WASMFS in a
87              worker due to an Emscripten limitation.</li>
88            <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a>
89              (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same
90              with verbose output and sanity-checking tests</a>) is an
91              sqlite3_vfs OPFS proxy using SharedArrayBuffer and the
92              Atomics APIs to regulate communication between the
93              synchronous sqlite3_vfs interface and the async OPFS
94              impl.
95            </li>
96          </ul>
97        </li>
98        <!--li><a href='x.html'></a></li-->
99      </ul>
100    </div>
101    <style>
102      #test-list { font-size: 120%; }
103    </style>
104    <script>//Assign a distinct target tab name for each test page...
105      document.querySelectorAll('a').forEach(function(e){
106          e.target = e.href;
107      });
108    </script>
109  </body>
110</html>
111