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>
16 border-radius:
0.25em;
19 <header id='titlebar'
><span>sqlite3 WASM test pages
</span></header>
21 <div>Below is the list of test pages for the sqlite3 WASM
22 builds. All of them require that this directory have been
23 "make"d first. The intent is that
<em>this
</em> page be run
25 <blockquote><pre>althttpd -enable-sab -page index.html
</pre></blockquote>
26 <div>and the individual tests be started in their own tab.
29 <li>All of these pages must be served via an HTTP
30 server. Browsers do not support loading WASM files via
32 <li>Any OPFS-related pages or tests require:
34 <li>An OPFS-capable browser released after February
35 2023. Some tests will work with Chromium-based browsers
36 going back to around v102.
</li>
37 <li>That the web server emit the so-called
38 <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'
>COOP
</a>
40 <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'
>COEP
</a>
41 headers.
<a href='https://sqlite.org/althttpd'
>althttpd
</a> requires the
42 <code>-enable-sab
</code> flag for that.
48 <div>The tests and demos...
52 <li><a href='tester1.html'
>tester1
</a>: Core unit and
53 regression tests for the various APIs and surrounding
55 <li><a href='tester1-worker.html'
>tester1-worker
</a>: same thing
56 but running in a Worker.
</li>
57 <li><a href='tester1-esm.html'
>tester1-esm
</a>: same as
58 <code>tester1
</code> but loads sqlite3 in the main thread via
61 <li><a href='tester1-worker.html?esm'
>tester1-worker?esm
</a>:
62 same as
<code>tester1-esm
</code> but loads a Worker Module which
63 then loads the sqlite3 API via an ES6 module. Note that
64 not all browsers permit loading modules in Worker
69 <li>High-level apps and demos...
71 <li><a href='fiddle/index.html'
>fiddle
</a> is an HTML front-end
72 to a wasm build of the sqlite3 shell.
</li>
73 <li><a href='demo-
123.html'
>demo-
123</a> provides a
74 no-nonsense example of adding sqlite3 support to a web
75 page in the UI thread.
</li>
76 <li><a href='demo-
123-worker.html'
>demo-
123-worker
</a> is
77 the same as
<code>demo-
123</code> but loads and runs
78 sqlite3 from a Worker thread.
</li>
79 <li><a href='demo-jsstorage.html'
>demo-jsstorage
</a>: very basic
80 demo of using the key-value VFS for storing a persistent db
81 in JS
<code>localStorage
</code> or
<code>sessionStorage
</code>.
</li>
82 <li><a href='demo-worker1.html'
>demo-worker1
</a>:
83 Worker-based wrapper of the OO API #
1. Its Promise-based
84 wrapper is significantly easier to use, however.
</li>
85 <li><a href='demo-worker1-promiser.html'
>demo-worker1-promiser
</a>:
86 a demo of the Promise-based wrapper of the Worker1 API.
</li>
87 <li><a href='demo-worker1-promiser-esm.html'
>demo-worker1-promiser-esm
</a>:
88 same as the previous demo except loads the promiser from an ESM module.
</li>
91 <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
93 <li><a href='speedtest1.html'
>speedtest1
</a>: a main-thread WASM build of speedtest1.
</li>
94 <li><a href='speedtest1.html?vfs=kvvfs'
>speedtest1?vfs=kvvfs
</a>: speedtest1 with the kvvfs.
</li>
95 <li><a href='speedtest1-worker.html?size=
15'
>speedtest1-worker
</a>: an interactive Worker-thread variant of speedtest1.
</li>
96 <li><a href='speedtest1-worker.html?vfs=opfs&size=
10'
>speedtest1-worker?vfs=opfs
</a>: speedtest1-worker with the
97 OPFS VFS preselected and configured for a moderate workload.
</li>
98 <li><a href='speedtest1-worker.html?vfs=opfs-sahpool&size=
10'
>speedtest1-worker?vfs=opfs-sahpool
</a>:
99 speedtest1-worker with the OPFS-SAHPOOL VFS preselected
100 and configured for a moderate workload.
104 <li>The obligatory
"misc." category...
106 <li><a href='module-symbols.html'
>module-symbols
</a> gives
107 a high-level overview of the symbols exposed by the JS
109 <!--li><a href='batch-runner.html'>batch-runner</a>: runs batches of
110 SQL exported from speedtest1.</li-->
111 <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a>
112 (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same
113 with verbose output and sanity-checking tests</a>) is an
114 sqlite3_vfs OPFS proxy using SharedArrayBuffer and the
115 Atomics APIs to regulate communication between the
116 synchronous sqlite3_vfs interface and the async OPFS
119 <li><a href='tests/opfs/concurrency/index.html'>OPFS concurrency</a>
120 tests using multiple workers.
124 <li><strong>WASMFS</strong>-specific tests which require that
125 the WASMFS build is available on this server (it is not by
126 default) and that this server emits the COOP/COEP headers.
128 <li><a href='scratchpad-wasmfs.html'>scratchpad-wasmfs</a>:
129 experimenting with WASMFS/OPFS-based persistence.
131 <li><a href='speedtest1-wasmfs.html?flags=--size,15'>speedtest1-wasmfs</a>:
132 a variant of speedtest1 built solely for the wasmfs/opfs
137 <!--li><a href='x.html'></a></li-->
141 #test-list { font-size: 120%; }
143 <script>//Assign a distinct target tab name for each test page...
144 document.querySelectorAll('a').forEach(function(e){
145 e.target = e.href.replace(/^http*:\/\/[^/]+\//, '');