| 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 |
<style> |
| 12 |
header { |
| 13 |
background: #044a64; |
| 14 |
color: white; |
| 15 |
padding: 0.5em; |
| 16 |
border-radius: 0.25em; |
| 17 |
} |
| 18 |
</style> |
| 19 |
<header id='titlebar'><span>sqlite3 WASM test pages</span></header> |
| 20 |
<hr> |
| 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 |
| 24 |
using:</div> |
| 25 |
<blockquote><pre>althttpd -enable-sab -page index.html</pre></blockquote> |
| 26 |
<div>and the individual tests be started in their own tab. |
| 27 |
Warnings and Caveats: |
| 28 |
<ul class='warning'> |
| 29 |
<li>All of these pages must be served via an HTTP |
| 30 |
server. Browsers do not support loading WASM files via |
| 31 |
file:// URLs.</li> |
| 32 |
<li>Any OPFS-related pages or tests require: |
| 33 |
<ul> |
| 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> |
| 39 |
and |
| 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. |
| 43 |
</li> |
| 44 |
</ul> |
| 45 |
</li> |
| 46 |
</ul> |
| 47 |
</div> |
| 48 |
<div>The tests and demos... |
| 49 |
<ul id='test-list'> |
| 50 |
<li>Core-most tests |
| 51 |
<ul> |
| 52 |
<li>tester1 (<a href='tester1.html'>32-bit</a> |
| 53 |
<a href='tester1-64bit.html'>64-bit</a>): Core unit and |
| 54 |
regression tests for the various APIs and surrounding |
| 55 |
utility code.</li> |
| 56 |
<li>tester1-esm (<a href='tester1-esm.html'>32-bit</a> |
| 57 |
<a href='tester1-esm-64bit.html'>64-bit</a>): same as |
| 58 |
<code>tester1</code> but loads sqlite3 in the main thread via |
| 59 |
an ES6 module. |
| 60 |
</li> |
| 61 |
<li>tester1-worker (<a href='tester1-worker.html'>32-bit</a> |
| 62 |
<a href='tester1-worker-64bit.html'>64-bit</a>): same thing |
| 63 |
but running in a Worker.</li> |
| 64 |
<li>tester1-worker ESM (<a href='tester1-worker.html?esm'>32-bit</a> |
| 65 |
<a href='tester1-worker-64bit.html?esm'>64-bit</a>): same as |
| 66 |
tester1-worker but loads a Worker Module which then |
| 67 |
loads the sqlite3 API via an ES6 module. Not all |
| 68 |
browsers permit loading modules in Worker threads. |
| 69 |
</li> |
| 70 |
</ul> |
| 71 |
</li> |
| 72 |
<li>High-level apps and demos... |
| 73 |
<ul> |
| 74 |
<li><a href='fiddle/index.html'>fiddle</a> is an HTML front-end |
| 75 |
to a wasm build of the sqlite3 shell.</li> |
| 76 |
<li><a href='demo-123.html'>demo-123</a> provides a |
| 77 |
no-nonsense example of adding sqlite3 support to a web |
| 78 |
page in the UI thread.</li> |
| 79 |
<li><a href='demo-123-worker.html'>demo-123-worker</a> is |
| 80 |
the same as <code>demo-123</code> but loads and runs |
| 81 |
sqlite3 from a Worker thread.</li> |
| 82 |
<li><a href='demo-jsstorage.html'>demo-jsstorage</a>: very basic |
| 83 |
demo of using the key-value VFS for storing a persistent db |
| 84 |
in JS <code>localStorage</code> or <code>sessionStorage</code>.</li> |
| 85 |
<li><a href='demo-worker1.html'>demo-worker1</a>: |
| 86 |
Worker-based wrapper of the OO API #1. Its Promise-based |
| 87 |
wrapper is significantly easier to use, however.</li> |
| 88 |
<li><a href='demo-worker1-promiser.html'>demo-worker1-promiser</a>: |
| 89 |
a demo of the Promise-based wrapper of the Worker1 API.</li> |
| 90 |
<li><a href='demo-worker1-promiser-esm.html'>demo-worker1-promiser-esm</a>: |
| 91 |
same as the previous demo except loads the promiser from an ESM module.</li> |
| 92 |
</ul> |
| 93 |
</li> |
| 94 |
<li>speedtest1 ports (sqlite3's primary benchmarking tool)... |
| 95 |
<ul> |
| 96 |
<li>speedtest1 |
| 97 |
(<a href='speedtest1.html'>32-bit</a>, |
| 98 |
<a href='speedtest1-64bit.html'>64-bit</a>): |
| 99 |
a main-thread WASM build of speedtest1.</li> |
| 100 |
<li>speedtest1?vfs=kvvfs |
| 101 |
(<a href='speedtest1.html?vfs=kvvfs'>32-bit</a>, |
| 102 |
<a href='speedtest1-64bit.html?vfs=kvvfs'>64-bit</a>): |
| 103 |
speedtest1 with the kvvfs.</li> |
| 104 |
<li>speedtest1-worker |
| 105 |
(<a href='speedtest1-worker.html?size=15'>32-bit</a>, |
| 106 |
<a href='speedtest1-worker-64bit.html?size=15'>64-bit</a>): |
| 107 |
an interactive Worker-thread variant of speedtest1.</li> |
| 108 |
<li>speedtest1-worker?vfs=kvvfs |
| 109 |
(<a href='speedtest1-worker.html?vfs=kvvfs&size=10'>32-bit</a>, |
| 110 |
<a href='speedtest1-worker-64bit.html?vfs=kvvfs&size=10'>64-bit</a>): |
| 111 |
speedtest1-worker with the |
| 112 |
kvvfs VFS preselected and configured for a moderate workload.</li> |
| 113 |
<li>speedtest1-worker?vfs=opfs |
| 114 |
(<a href='speedtest1-worker.html?vfs=opfs&size=10'>32-bit</a>, |
| 115 |
<a href='speedtest1-worker-64bit.html?vfs=opfs&size=10'>64-bit</a>): |
| 116 |
speedtest1-worker with the |
| 117 |
OPFS VFS preselected and configured for a moderate workload.</li> |
| 118 |
<li>speedtest1-worker?vfs=opfs-wl |
| 119 |
(<a href='speedtest1-worker.html?vfs=opfs-wl&size=10'>32-bit</a>, |
| 120 |
<a href='speedtest1-worker-64bit.html?vfs=opfs-wl&size=10'>64-bit</a>): |
| 121 |
speedtest1-worker with the |
| 122 |
OPFS Web Locks VFS preselected and configured for a moderate workload.</li> |
| 123 |
<li>speedtest1-worker?vfs=opfs-sahpool |
| 124 |
(<a href='speedtest1-worker.html?vfs=opfs-sahpool&size=10'>32-bit</a>, |
| 125 |
<a href='speedtest1-worker-64bit.html?vfs=opfs-sahpool&size=10'>64-bit</a>): |
| 126 |
speedtest1-worker with the OPFS-SAHPOOL VFS preselected |
| 127 |
and configured for a moderate workload. |
| 128 |
</li> |
| 129 |
</ul> |
| 130 |
</li> |
| 131 |
<li>The obligatory "misc." category... |
| 132 |
<ul> |
| 133 |
<li><a href='module-symbols.html'>module-symbols</a> gives |
| 134 |
a high-level overview of the symbols exposed by the JS |
| 135 |
module.</li> |
| 136 |
<!--li><a href='batch-runner.html'>batch-runner</a>: runs batches of |
| 137 |
SQL exported from speedtest1.</li--> |
| 138 |
<li><a href='test-opfs-vfs.html'>test-opfs-vfs</a> |
| 139 |
(<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same |
| 140 |
with verbose output and sanity-checking tests</a>) is an |
| 141 |
sqlite3_vfs OPFS proxy using SharedArrayBuffer and the |
| 142 |
Atomics APIs to regulate communication between the |
| 143 |
synchronous sqlite3_vfs interface and the async OPFS |
| 144 |
impl. |
| 145 |
</li> |
| 146 |
<li><a href='tests/opfs/concurrency/index.html'>OPFS concurrency</a> |
| 147 |
tests using multiple workers. |
| 148 |
</li> |
| 149 |
<li><a href='tests/opfs/sahpool/index.html'>OPFS SAHPool cooperative semi-concurrency</a> |
| 150 |
demonstrates usage of the OPFS SAHPool VFS's "pause" feature to coordinate |
| 151 |
access to a database. |
| 152 |
</li> |
| 153 |
<li><a href='SQLTester/index.html'>SQLTester</a> is |
| 154 |
another testing tool for the library but making use of |
| 155 |
it requires tests from an external, proprietary |
| 156 |
project. Despite not being useful to the general public, |
| 157 |
a link to it is in this list so that its developer has |
| 158 |
easy access to it. |
| 159 |
</li> |
| 160 |
</ul> |
| 161 |
</li> |
| 162 |
<li><strong>WASMFS</strong>-specific tests which require that |
| 163 |
the WASMFS build is available on this server (it is not by |
| 164 |
default) and that this server emits the COOP/COEP headers. |
| 165 |
<ul> |
| 166 |
<li><a href='scratchpad-wasmfs.html'>scratchpad-wasmfs</a>: |
| 167 |
experimenting with WASMFS/OPFS-based persistence. |
| 168 |
</li> |
| 169 |
<!--speedtest1-wasmfs's build was broken in refactoring and it |
| 170 |
has not been used in years, but it may be interesting |
| 171 |
to revisit someday |
| 172 |
li><a href='speedtest1-wasmfs.html?flags=--size,10'>speedtest1-wasmfs</a>: |
| 173 |
a variant of speedtest1 built solely for the wasmfs/opfs |
| 174 |
feature. |
| 175 |
</li--> |
| 176 |
</ul> |
| 177 |
</li> |
| 178 |
<!--li><a href='x.html'></a></li--> |
| 179 |
</ul> |
| 180 |
</div> |
| 181 |
<style> |
| 182 |
#test-list { font-size: 120%; } |
| 183 |
</style> |
| 184 |
<script>//Assign a distinct target tab name for each test page... |
| 185 |
document.querySelectorAll('a').forEach(function(e){ |
| 186 |
e.target = e.href.replace(/^http*:\/\/[^/]+\//, ''); |
| 187 |
}); |
| 188 |
</script> |
| 189 |
</body> |
| 190 |
</html> |