xref: /sqlite-3.40.0/ext/wasm/index.html (revision 278d3faf)
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 -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. The default build
27          of <a href='https://sqlite.org/althttpd'>althttpd</a>
28          <em>does not</em>.
29        </li>
30        <li>Any OPFS-related pages require very recent version of
31          Chrome or Chromium (v102 at least, possibly newer). OPFS
32          support in the other major browsers is pending. Development
33          and testing is currently done against a dev-channel release
34          of Chrome (v107 as of 2022-09-26).
35        </li>
36        <li>Whether or not WASMFS/OPFS support is enabled on any given
37          page may depend on build-time options which are <em>off by
38          default</em> because they currently (as of 2022-09-08) break
39          with Worker-based pages.
40          <!-- Similarly, WASMFS does not work on some platforms,
41               e.g. Raspberry Pi 4 (for which there is no Chrome
42               build, so it's currently a moot point). -->
43        </li>
44      </ul>
45    </div>
46    <div>The tests and demos...
47      <ul id='test-list'>
48        <li>High-level apps and demos...
49          <ul>
50            <li><a href='fiddle/fiddle.html'>fiddle</a> is an HTML front-end
51              to a wasm build of the sqlite3 shell.</li>
52            <li><a href='demo-123.html'>demo-123</a> provides a
53              no-nonsense example of adding sqlite3 support to a web
54              page in the UI thread.</li>
55            <li><a href='demo-123-worker.html'>demo-123-worker</a> is
56              the same as <code>demo-123</code> but loads and runs
57              sqlite3 from a Worker thread.</li>
58            <li><a href='demo-kvvfs1.html'>demo-kvvfs1</a>: very basic
59              demo of using the key-value VFS for storing a persistent db
60              in JS <code>localStorage</code> or <code>sessionStorage</code>.</li>
61          </ul>
62        </li>
63        <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
64          <ul>
65            <li><a href='speedtest1.html'>speedtest1</a>: a main-thread WASM build of speedtest1.</li>
66            <li><a href='speedtest1-wasmfs.html'>speedtest1-wasmfs</a>: a variant of speedtest1 built solely for the wasmfs/opfs feature.</li>
67            <li><a href='speedtest1.html?vfs=kvvfs'>speedtest1-kvvfs</a>: speedtest1 with the kvvfs.</li>
68            <li><a href='speedtest1-worker.html'>speedtest1-worker</a>: an interactive Worker-thread variant of speedtest1.</li>
69            <li><a href='speedtest1-worker.html?vfs=opfs&size=25'>speedtest1-worker-opfs</a>: speedtest1-worker with the
70              OPFS VFS preselected and configured for a moderate workload.</li>
71          </ul>
72        </li>
73        <li>The obligatory "misc." category...
74          <ul>
75            <li><a href='testing1.html'>testing1</a>: sanity tests of the core APIs and surrounding utility code.</li>
76            <li><a href='testing2.html'>testing2</a>: Worker-based test of OO API #1.</li>
77            <li><a href='testing-worker1-promiser.html'>testing-worker1-promiser</a>:
78              tests for the Promise-based wrapper of the Worker-based API.</li>
79            <li><a href='batch-runner.html'>batch-runner</a>: runs batches of SQL exported from speedtest1.</li>
80            <li><a href='scratchpad-wasmfs-main.html'>scratchpad-wasmfs-main</a>:
81              experimenting with WASMFS/OPFS-based persistence. Maintenance
82              reminder: we cannot currently (2022-09-15) load WASMFS in a
83              worker due to an Emscripten limitation.</li>
84            <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a>
85              (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same
86                with verbose output and sanity-checking tests</a>) is an
87              experiment in implementing a syncronous sqlite3 VFS proxy
88              for a fully asynchronous backend interface (namely OPFS),
89              using SharedArrayBuffer and the Atomics APIs to regulate
90              communication between the synchronous interface and the
91              async impl.
92            </li>
93          </ul>
94        </li>
95        <!--li><a href='x.html'></a></li-->
96      </ul>
97    </div>
98    <style>
99      #test-list { font-size: 120%; }
100    </style>
101    <script>//Assign a distinct target tab name for each test page...
102      document.querySelectorAll('a').forEach(function(e){
103          e.target = e.href;
104      });
105    </script>
106  </body>
107</html>
108