sqlite
[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.
Brought by drakestapleton
sqlite / ext / wasm / README-dist.txt
| 1 | This is the README for the sqlite3 WASM/JS distribution. |
| 2 | |
| 3 | Main project page: https://sqlite.org |
| 4 | |
| 5 | Documentation: https://sqlite.org/wasm |
| 6 | |
| 7 | This archive contains the following deliverables for the WASM/JS |
| 8 | build: |
| 9 | |
| 10 | - jswasm/sqlite3.js is the canonical "vanilla JS" version. |
| 11 | |
| 12 | - jswasm/sqlite3.mjs is the same but in ES6 module form |
| 13 | |
| 14 | - jswasm/*-bundler-friendly.js and .mjs are variants which are |
| 15 | intended to be compatible with "bundler" tools commonly seen in |
| 16 | node.js-based projects. Projects using such tools should use those |
| 17 | variants, where available, instead of files without the |
| 18 | "-bundler-friendly" suffix. Some files do not have separate |
| 19 | variants. |
| 20 | |
| 21 | - jswasm/sqlite3.wasm is the binary WASM file imported by all of the |
| 22 | above-listed JS files. |
| 23 | |
| 24 | - The jswasm directory additionally contains a number of supplemental |
| 25 | JS files which cannot be bundled directly with the main JS files |
| 26 | but are necessary for certain usages. |
| 27 | |
| 28 | - The top-level directory contains various demonstration and test |
| 29 | applications for sqlite3.js and sqlite3.mjs. |
| 30 | sqlite3-bundler-friendly.mjs requires client-side build tools to make |
| 31 | use of and is not demonstrated here. |
| 32 | |
| 33 | Browsers will not serve WASM files from file:// URLs, so the test and |
| 34 | demonstration apps require a web server and that server must, for the |
| 35 | OPFS[^1]-related features, include the following headers in its response |
| 36 | when serving the files: |
| 37 | |
| 38 | Cross-Origin-Opener-Policy: same-origin |
| 39 | Cross-Origin-Embedder-Policy: require-corp |
| 40 | |
| 41 | Most functionality will work without those headers but the OPFS[^1] |
| 42 | storage capability will not be available without them. |
| 43 | |
| 44 | One simple way to get the demo apps up and running on Unix-style |
| 45 | systems is to install althttpd (https://sqlite.org/althttpd) and run: |
| 46 | |
| 47 | althttpd --enable-sab --page index.html |
| 48 | |
| 49 | |
| 50 | [^1]: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system |