xref: /sqlite-3.40.0/ext/wasm/index.html (revision f03ddcca)
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>.
38        </li>
39      </ul>
40    </div>
41    <div>The tests and demos...
42      <ul id='test-list'>
43        <li>Core-most tests
44          <ul>
45            <li><a href='tester1.html'>tester1</a>: Core unit and
46              regression tests for the various APIs and surrounding
47              utility code.</li>
48            <li><a href='tester1-worker.html'>tester1-worker</a>: same thing
49            but running in a Worker.</li>
50          </ul>
51        </li>
52        <li>High-level apps and demos...
53          <ul>
54            <li><a href='fiddle/index.html'>fiddle</a> is an HTML front-end
55              to a wasm build of the sqlite3 shell.</li>
56            <li><a href='demo-123.html'>demo-123</a> provides a
57              no-nonsense example of adding sqlite3 support to a web
58              page in the UI thread.</li>
59            <li><a href='demo-123-worker.html'>demo-123-worker</a> is
60              the same as <code>demo-123</code> but loads and runs
61              sqlite3 from a Worker thread.</li>
62            <li><a href='demo-jsstorage.html'>demo-jsstorage</a>: very basic
63              demo of using the key-value VFS for storing a persistent db
64              in JS <code>localStorage</code> or <code>sessionStorage</code>.</li>
65            <li><a href='demo-worker1.html'>demo-worker1</a>:
66              Worker-based wrapper of the OO API #1. Its Promise-based
67              wrapper is significantly easier to use, however.</li>
68            <li><a href='demo-worker1-promiser.html'>demo-worker1-promiser</a>:
69              a demo of the Promise-based wrapper of the Worker1 API.</li>
70          </ul>
71        </li>
72        <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
73          <ul>
74            <li><a href='speedtest1.html'>speedtest1</a>: a main-thread WASM build of speedtest1.</li>
75            <!--li><a href='speedtest1-wasmfs.html?flags=--size,25'>speedtest1-wasmfs</a>: a variant of speedtest1 built solely for the wasmfs/opfs feature.
76                </li-->
77            <li><a href='speedtest1.html?vfs=kvvfs'>speedtest1-kvvfs</a>: speedtest1 with the kvvfs.</li>
78            <li><a href='speedtest1-worker.html?size=25'>speedtest1-worker</a>: an interactive Worker-thread variant of speedtest1.</li>
79            <li><a href='speedtest1-worker.html?vfs=opfs&size=25'>speedtest1-worker-opfs</a>: speedtest1-worker with the
80              OPFS VFS preselected and configured for a moderate workload.</li>
81          </ul>
82        </li>
83        <li>The obligatory "misc." category...
84          <ul>
85            <li><a href='module-symbols.html'>module-symbols</a> gives
86              a high-level overview of the symbols exposed by the JS
87              module.</li>
88            <li><a href='batch-runner.html'>batch-runner</a>: runs batches of SQL exported from speedtest1.</li>
89            <!--li><a href='scratchpad-wasmfs-main.html'>scratchpad-wasmfs-main</a>:
90              experimenting with WASMFS/OPFS-based persistence. Maintenance
91              reminder: we cannot currently (2022-09-15) load WASMFS in a
92              worker due to an Emscripten limitation.</li-->
93            <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a>
94              (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same
95              with verbose output and sanity-checking tests</a>) is an
96              sqlite3_vfs OPFS proxy using SharedArrayBuffer and the
97              Atomics APIs to regulate communication between the
98              synchronous sqlite3_vfs interface and the async OPFS
99              impl.
100            </li>
101          </ul>
102        </li>
103        <!--li><a href='x.html'></a></li-->
104      </ul>
105    </div>
106    <style>
107      #test-list { font-size: 120%; }
108    </style>
109    <script>//Assign a distinct target tab name for each test page...
110      document.querySelectorAll('a').forEach(function(e){
111          e.target = e.href;
112      });
113    </script>
114  </body>
115</html>
116