sqlite3 WASM Demo Page Index
sqlite3 WASM demo pages
Below is the list of demo pages for the sqlite3 WASM
builds. The intent is that this page be run
using the functional equivalent of:
althttpd -enable-sab -page index.html
and the individual pages be started in their own tab.
Warnings and Caveats:
All of these pages must be served via an HTTP
server. Browsers do not support loading WASM files via
file:// URLs.
Any OPFS-related pages or tests require:
That the web server emit the so-called
COOP
and
COEP
headers. althttpd requires the
-enable-sab flag for that.
A very recent version of a Chromium-based browser
(v102 at least, possibly newer). OPFS support in the
other major browsers is pending. Development and testing
is currently done against a dev-channel release of
Chrome (v111 as of 2023-02-10).
The tests and demos...
Core-most tests
tester1 : Core unit and
regression tests for the various APIs and surrounding
utility code.
tester1-worker : same thing
but running in a Worker.
tester1-esm : same as
tester1 but loads sqlite3 in the main thread via
an ES6 module.
tester1-worker?esm :
same as tester1-esm but loads a Worker Module which
then loads the sqlite3 API via an ES6 module. Note that
not all browsers permit loading modules in Worker
threads.
Higher-level apps and demos...
demo-123 provides a
no-nonsense example of adding sqlite3 support to a web
page in the UI thread.
demo-123-worker is
the same as demo-123 but loads and runs
sqlite3 from a Worker thread.
demo-jsstorage : very basic
demo of using the key-value VFS for storing a persistent db
in JS localStorage or sessionStorage .
demo-worker1 :
Worker-based wrapper of the OO API #1. Its Promise-based
wrapper is significantly easier to use, however.
demo-worker1-promiser :
a demo of the Promise-based wrapper of the Worker1 API.