xref: /sqlite-3.40.0/ext/wasm/index.html (revision d92c652a)
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
3744a87f08Sstephan          default</em> because they currently (as of 2022-09-08) break
381f095d48Sstephan          with Worker-based pages.
3944a87f08Sstephan        </li>
4044a87f08Sstephan      </ul>
4144a87f08Sstephan    </div>
421f095d48Sstephan    <div>The tests and demos...
4344a87f08Sstephan      <ul id='test-list'>
44*d92c652aSstephan        <li>Core-most tests
45*d92c652aSstephan          <ul>
46*d92c652aSstephan            <li><a href='tester1.html'>tester1</a>: Core unit and
47*d92c652aSstephan              regression tests for the various APIs and surrounding
48*d92c652aSstephan              utility code.</li>
49*d92c652aSstephan            <li><a href='tester1.html'>tester1-worker</a>: same thing
50*d92c652aSstephan            but running in a Worker.</li>
51*d92c652aSstephan          </ul>
52*d92c652aSstephan        </li>
53171b168bSstephan        <li>High-level apps and demos...
54171b168bSstephan          <ul>
55ebe14230Sstephan            <li><a href='fiddle/fiddle.html'>fiddle</a> is an HTML front-end
56ebe14230Sstephan              to a wasm build of the sqlite3 shell.</li>
57ac51eb77Sstephan            <li><a href='demo-123.html'>demo-123</a> provides a
581f095d48Sstephan              no-nonsense example of adding sqlite3 support to a web
591f095d48Sstephan              page in the UI thread.</li>
601f095d48Sstephan            <li><a href='demo-123-worker.html'>demo-123-worker</a> is
611f095d48Sstephan              the same as <code>demo-123</code> but loads and runs
621f095d48Sstephan              sqlite3 from a Worker thread.</li>
63171b168bSstephan            <li><a href='demo-kvvfs1.html'>demo-kvvfs1</a>: very basic
641f095d48Sstephan              demo of using the key-value VFS for storing a persistent db
651f095d48Sstephan              in JS <code>localStorage</code> or <code>sessionStorage</code>.</li>
66171b168bSstephan          </ul>
67171b168bSstephan        </li>
68171b168bSstephan        <li>speedtest1 ports (sqlite3's primary benchmarking tool)...
69171b168bSstephan          <ul>
70171b168bSstephan            <li><a href='speedtest1.html'>speedtest1</a>: a main-thread WASM build of speedtest1.</li>
713d645484Sstephan            <li><a href='speedtest1-wasmfs.html?flags=--size,25'>speedtest1-wasmfs</a>: a variant of speedtest1 built solely for the wasmfs/opfs feature.</li>
72171b168bSstephan            <li><a href='speedtest1.html?vfs=kvvfs'>speedtest1-kvvfs</a>: speedtest1 with the kvvfs.</li>
733d645484Sstephan            <li><a href='speedtest1-worker.html?size=25'>speedtest1-worker</a>: an interactive Worker-thread variant of speedtest1.</li>
74d8897d97Sstephan            <li><a href='speedtest1-worker.html?vfs=opfs&size=25'>speedtest1-worker-opfs</a>: speedtest1-worker with the
75171b168bSstephan              OPFS VFS preselected and configured for a moderate workload.</li>
76171b168bSstephan          </ul>
77171b168bSstephan        </li>
78171b168bSstephan        <li>The obligatory "misc." category...
79171b168bSstephan          <ul>
8044a87f08Sstephan            <li><a href='testing2.html'>testing2</a>: Worker-based test of OO API #1.</li>
8144a87f08Sstephan            <li><a href='testing-worker1-promiser.html'>testing-worker1-promiser</a>:
8244a87f08Sstephan              tests for the Promise-based wrapper of the Worker-based API.</li>
8344a87f08Sstephan            <li><a href='batch-runner.html'>batch-runner</a>: runs batches of SQL exported from speedtest1.</li>
840117693fSstephan            <li><a href='scratchpad-wasmfs-main.html'>scratchpad-wasmfs-main</a>:
850117693fSstephan              experimenting with WASMFS/OPFS-based persistence. Maintenance
860117693fSstephan              reminder: we cannot currently (2022-09-15) load WASMFS in a
870117693fSstephan              worker due to an Emscripten limitation.</li>
880db30895Sstephan            <li><a href='test-opfs-vfs.html'>test-opfs-vfs</a>
890db30895Sstephan              (<a href='test-opfs-vfs.html?opfs-sanity-check&opfs-verbose'>same
900db30895Sstephan                with verbose output and sanity-checking tests</a>) is an
91132a87baSstephan              experiment in implementing a syncronous sqlite3 VFS proxy
920db30895Sstephan              for a fully asynchronous backend interface (namely OPFS),
930db30895Sstephan              using SharedArrayBuffer and the Atomics APIs to regulate
940db30895Sstephan              communication between the synchronous interface and the
950db30895Sstephan              async impl.
96132a87baSstephan            </li>
97171b168bSstephan          </ul>
98171b168bSstephan        </li>
9944a87f08Sstephan        <!--li><a href='x.html'></a></li-->
10044a87f08Sstephan      </ul>
10144a87f08Sstephan    </div>
10244a87f08Sstephan    <style>
10344a87f08Sstephan      #test-list { font-size: 120%; }
10444a87f08Sstephan    </style>
10544a87f08Sstephan    <script>//Assign a distinct target tab name for each test page...
10644a87f08Sstephan      document.querySelectorAll('a').forEach(function(e){
10744a87f08Sstephan          e.target = e.href;
10844a87f08Sstephan      });
10944a87f08Sstephan    </script>
11044a87f08Sstephan  </body>
11144a87f08Sstephan</html>
112