Snapshot of upstream SQLite 3.46.1
[sqlcipher.git] / ext / wasm / index.html
blobd12a3aa03f60ba0a2360c62f6fc78f8a7799d828
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;
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><a href='tester1.html'>tester1</a>: Core unit and
53 regression tests for the various APIs and surrounding
54 utility code.</li>
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
59 an ES6 module.
60 </li>
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
65 threads.
66 </li>
67 </ul>
68 </li>
69 <li>High-level apps and demos...
70 <ul>
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>
89 </ul>
90 </li>
91 <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
92 <ul>
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.
101 </li>
102 </ul>
103 </li>
104 <li>The obligatory "misc." category...
105 <ul>
106 <li><a href='module-symbols.html'>module-symbols</a> gives
107 a high-level overview of the symbols exposed by the JS
108 module.</li>
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
117 impl.
118 </li>
119 <li><a href='tests/opfs/concurrency/index.html'>OPFS concurrency</a>
120 tests using multiple workers.
121 </li>
122 </ul>
123 </li>
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.
127 <ul>
128 <li><a href='scratchpad-wasmfs.html'>scratchpad-wasmfs</a>:
129 experimenting with WASMFS/OPFS-based persistence.
130 </li>
131 <li><a href='speedtest1-wasmfs.html?flags=--size,15'>speedtest1-wasmfs</a>:
132 a variant of speedtest1 built solely for the wasmfs/opfs
133 feature.
134 </li>
135 </ul>
136 </li>
137 <!--li><a href='x.html'></a></li-->
138 </ul>
139 </div>
140 <style>
141 #test-list { font-size: 120%; }
142 </style>
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*:\/\/[^/]+\//, '');
147 </script>
148 </body>
149 </html>