Below is the list of test pages for the sqlite3 WASM
builds. All of them require that this directory have been
"make"d first. The intent is that this page be run
using:
althttpd -page index.html
and the individual tests be started in their own tab.
Warnings and Caveats:
- Some of these pages require that
the web server emit the so-called COOP and COEP headers. The
default build of althttpd does not.
- Any OPFS-related pages require very recent
version of Chrome or Chromium (v102 at least, possibly
newer). OPFS support in the other major browsers is
pending.
- Whether or not WASMFS/OPFS support is enabled on any given
page may depend on build-time options which are off by
default because they currently (as of 2022-09-08) break
with Worker-based pages. Similarly, WASMFS does not work on
some platforms, e.g. Raspberry Pi 4.
The tests...
- High-level apps and demos...
- fiddle is an HTML front-end
to a wasm build of the sqlite3 shell.
- demo-123 provides a
no-nonsense example of adding sqlite3 support to a
web page.
- demo-123-worker is the
same as
demo-123 but loads and run sqlite3 from
a Worker thread.
- demo-kvvfs1: very basic
demo of using the key-value vfs for storing a persistent db
in JS localStorage or sessionStorage.
- speedtest1 ports (sqlite3's primary benchmarking tool)...
- The obligatory "misc." category...
- testing1: sanity tests of the core APIs and surrounding utility code.
- testing2: Worker-based test of OO API #1.
- testing-worker1-promiser:
tests for the Promise-based wrapper of the Worker-based API.
- batch-runner: runs batches of SQL exported from speedtest1.
- scratchpad-wasmfs-main:
experimenting with WASMFS/OPFS-based persistence. Maintenance
reminder: we cannot currently (2022-09-15) load WASMFS in a
worker due to an Emscripten limitation.
- test-opfs-vfs
(same
with verbose output and sanity-checking tests) is an
experiment in implementing a syncronous sqlite3 VFS proxy
for a fully asynchronous backend interface (namely OPFS),
using SharedArrayBuffer and the Atomics APIs to regulate
communication between the synchronous interface and the
async impl.