144a87f08Sstephan<!doctype html> 244a87f08Sstephan<html lang="en-us"> 344a87f08Sstephan <head> 444a87f08Sstephan <meta charset="utf-8"> 544a87f08Sstephan <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 644a87f08Sstephan <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon"> 744a87f08Sstephan <link rel="stylesheet" href="common/testing.css"/> 844a87f08Sstephan <title>sqlite3 WASM Testing Page Index</title> 944a87f08Sstephan </head> 1044a87f08Sstephan <body> 1144a87f08Sstephan <header id='titlebar'><span>sqlite3 WASM test pages</span></header> 1244a87f08Sstephan <hr> 1344a87f08Sstephan <div>Below is the list of test pages for the sqlite3 WASM 1444a87f08Sstephan builds. All of them require that this directory have been 1544a87f08Sstephan "make"d first. The intent is that <em>this</em> page be run 1644a87f08Sstephan using:</div> 173d645484Sstephan <blockquote><pre>althttpd -enable-sab -page index.html</pre></blockquote> 181f095d48Sstephan <div>and the individual tests be started in their own tab. 191f095d48Sstephan Warnings and Caveats: 2044a87f08Sstephan <ul class='warning'> 2144a87f08Sstephan <li>Some of these pages require that 221f095d48Sstephan the web server emit the so-called 231f095d48Sstephan <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy'>COOP</a> 241f095d48Sstephan and 251f095d48Sstephan <a href='https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy'>COEP</a> 263d645484Sstephan headers. <a href='https://sqlite.org/althttpd'>althttpd</a> requires the 273d645484Sstephan <code>-enable-sab</code> flag for that. 2844a87f08Sstephan </li> 291f095d48Sstephan <li>Any OPFS-related pages require very recent version of 301f095d48Sstephan Chrome or Chromium (v102 at least, possibly newer). OPFS 311f095d48Sstephan support in the other major browsers is pending. Development 321f095d48Sstephan and testing is currently done against a dev-channel release 331f095d48Sstephan of Chrome (v107 as of 2022-09-26). 341f095d48Sstephan </li> 3544a87f08Sstephan <li>Whether or not WASMFS/OPFS support is enabled on any given 3644a87f08Sstephan page may depend on build-time options which are <em>off by 3771de8e02Sstephan default</em>. 3844a87f08Sstephan </li> 3944a87f08Sstephan </ul> 4044a87f08Sstephan </div> 411f095d48Sstephan <div>The tests and demos... 4244a87f08Sstephan <ul id='test-list'> 43d92c652aSstephan <li>Core-most tests 44d92c652aSstephan <ul> 45d92c652aSstephan <li><a href='tester1.html'>tester1</a>: Core unit and 46d92c652aSstephan regression tests for the various APIs and surrounding 47d92c652aSstephan utility code.</li> 4895639269Sstephan <li><a href='tester1-worker.html'>tester1-worker</a>: same thing 49d92c652aSstephan but running in a Worker.</li> 50d92c652aSstephan </ul> 51d92c652aSstephan </li> 52171b168bSstephan <li>High-level apps and demos... 53171b168bSstephan <ul> 547731dfcaSstephan <li><a href='fiddle/index.html'>fiddle</a> is an HTML front-end 55ebe14230Sstephan to a wasm build of the sqlite3 shell.</li> 56ac51eb77Sstephan <li><a href='demo-123.html'>demo-123</a> provides a 571f095d48Sstephan no-nonsense example of adding sqlite3 support to a web 581f095d48Sstephan page in the UI thread.</li> 591f095d48Sstephan <li><a href='demo-123-worker.html'>demo-123-worker</a> is 601f095d48Sstephan the same as <code>demo-123</code> but loads and runs 611f095d48Sstephan sqlite3 from a Worker thread.</li> 62fd31ae3bSstephan <li><a href='demo-jsstorage.html'>demo-jsstorage</a>: very basic 631f095d48Sstephan demo of using the key-value VFS for storing a persistent db 641f095d48Sstephan in JS <code>localStorage</code> or <code>sessionStorage</code>.</li> 65fd31ae3bSstephan <li><a href='demo-worker1.html'>demo-worker1</a>: 66fd31ae3bSstephan Worker-based wrapper of the OO API #1. Its Promise-based 67fd31ae3bSstephan wrapper is significantly easier to use, however.</li> 68fd31ae3bSstephan <li><a href='demo-worker1-promiser.html'>demo-worker1-promiser</a>: 69fd31ae3bSstephan a demo of the Promise-based wrapper of the Worker1 API.</li> 70171b168bSstephan </ul> 71171b168bSstephan </li> 72171b168bSstephan <li>speedtest1 ports (sqlite3's primary benchmarking tool)... 73171b168bSstephan <ul> 74171b168bSstephan <li><a href='speedtest1.html'>speedtest1</a>: a main-thread WASM build of speedtest1.</li> 7571de8e02Sstephan <!--li><a href='speedtest1-wasmfs.html?flags=--size,25'>speedtest1-wasmfs</a>: a variant of speedtest1 built solely for the wasmfs/opfs feature. 7671de8e02Sstephan </li--> 77171b168bSstephan <li><a href='speedtest1.html?vfs=kvvfs'>speedtest1-kvvfs</a>: speedtest1 with the kvvfs.</li> 783d645484Sstephan <li><a href='speedtest1-worker.html?size=25'>speedtest1-worker</a>: an interactive Worker-thread variant of speedtest1.</li> 79d8897d97Sstephan <li><a href='speedtest1-worker.html?vfs=opfs&size=25'>speedtest1-worker-opfs</a>: speedtest1-worker with the 80171b168bSstephan OPFS VFS preselected and configured for a moderate workload.</li> 81171b168bSstephan </ul> 82171b168bSstephan </li> 83171b168bSstephan <li>The obligatory "misc." category... 84171b168bSstephan <ul> 85*f03ddccaSstephan <li><a href='module-symbols.html'>module-symbols</a> gives 86*f03ddccaSstephan a high-level overview of the symbols exposed by the JS 87*f03ddccaSstephan module.</li> 8844a87f08Sstephan <li><a href='batch-runner.html'>batch-runner</a>: runs batches of SQL exported from speedtest1.</li> 8971de8e02Sstephan <!--li><a href='scratchpad-wasmfs-main.html'>scratchpad-wasmfs-main</a>: 900117693fSstephan experimenting with WASMFS/OPFS-based persistence. Maintenance 910117693fSstephan reminder: we cannot currently (2022-09-15) load WASMFS in a 9271de8e02Sstephan worker due to an Emscripten limitation.</li--> 930db30895Sstephan <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a> 940db30895Sstephan (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same 950db30895Sstephan with verbose output and sanity-checking tests</a>) is an 96e493f8f0Sstephan sqlite3_vfs OPFS proxy using SharedArrayBuffer and the 97e493f8f0Sstephan Atomics APIs to regulate communication between the 98e493f8f0Sstephan synchronous sqlite3_vfs interface and the async OPFS 99e493f8f0Sstephan impl. 100132a87baSstephan </li> 101171b168bSstephan </ul> 102171b168bSstephan </li> 10344a87f08Sstephan <!--li><a href='x.html'></a></li--> 10444a87f08Sstephan </ul> 10544a87f08Sstephan </div> 10644a87f08Sstephan <style> 10744a87f08Sstephan #test-list { font-size: 120%; } 10844a87f08Sstephan </style> 10944a87f08Sstephan <script>//Assign a distinct target tab name for each test page... 11044a87f08Sstephan document.querySelectorAll('a').forEach(function(e){ 11144a87f08Sstephan e.target = e.href; 11244a87f08Sstephan }); 11344a87f08Sstephan </script> 11444a87f08Sstephan </body> 11544a87f08Sstephan</html> 116