README-dist.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. This is the README for the sqlite3 WASM/JS distribution.
  2. Main project page: https://sqlite.org
  3. Documentation: https://sqlite.org/wasm
  4. This archive contains the following deliverables for the WASM/JS
  5. build:
  6. - jswasm/sqlite3.js is the canonical "vanilla JS" version.
  7. - jswasm/sqlite3.mjs is the same but in ES6 module form
  8. - jswasm/*-bundler-friendly.js and .mjs are variants which are
  9. intended to be compatible with "bundler" tools commonly seen in
  10. node.js-based projects. Projects using such tools should use those
  11. variants, where available, instead of files without the
  12. "-bundler-friendly" suffix. Some files do not have separate
  13. variants.
  14. - jswasm/sqlite3.wasm is the binary WASM file imported by all of the
  15. above-listed JS files.
  16. - The jswasm directory additionally contains a number of supplemental
  17. JS files which cannot be bundled directly with the main JS files
  18. but are necessary for certain usages.
  19. - The top-level directory contains various demonstration and test
  20. applications for sqlite3.js and sqlite3.mjs.
  21. sqlite3-bundler-friendly.mjs requires client-side build tools to make
  22. use of and is not demonstrated here.
  23. Browsers will not serve WASM files from file:// URLs, so the test and
  24. demonstration apps require a web server and that server must include
  25. the following headers in its response when serving the files:
  26. Cross-Origin-Opener-Policy: same-origin
  27. Cross-Origin-Embedder-Policy: require-corp
  28. The core library will function without those headers but certain
  29. features, most notably OPFS storage, will not be available.
  30. One simple way to get the demo apps up and running on Unix-style
  31. systems is to install althttpd (https://sqlite.org/althttpd) and run:
  32. althttpd --enable-sab --page index.html