Back to Sqlite

sqlite3 WASM Demo Page Index

ext/wasm/index-dist.html

latest2.2 KB
Original Source

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](https://sqlite.org/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:
    • An OPFS-capable browser released after February 2023. Some tests will work with Chromium-based browsers going back to around v102.
    • That the web server emit the so-called COOP and COEP headers. althttpd requires the -enable-sab flag for that.

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.
    • module-symbols gives a high-level overview of the symbols exposed by the JS module.