8 ms·
The CORS restrictions / needing SharedArrayBuffer support kinda stinks. There is no way to use Sqlite3 off-thread without memory sharing? Couldn't postMessage
by koolala 2y ago
The CORS restrictions / needing SharedArrayBuffer support kinda stinks.
There is no way to use Sqlite3 off-thread without memory sharing? Couldn't postMessage work to pass data to the sqlite thread by using the third Transfer argument?
Would postMessage transfer allow memory to be stored in a sqlite wasm database running a worker off-thread?
Refering to this implementation's docs:
https://github.com/sqlite/sqlite-wasm https://github.com/sqlite/sqlite-wasm
- sgbeal 2y ago> The CORS restrictions / needing SharedArrayBuffer support kinda stinks. We have no CORS restrictions but one specific (and optional) VFS requires COOP/COEP for SharedArrayBuffer. If SharedArrayBuffer isn't available, that VFS won't load, but the rest of the library will plod along just fine: https://sqlite.org/wasm/doc/tip/persistence.md https://sqlite.org/wasm/doc/tip/persistence.md
- koolala 2y agoPersistence is the whole point to me for a Database. OPFS finally adding a filesystem to the browser made seem like the web file database situation could finally standardize but COOP/COEP ruins it.
- eirikhm 2y agohttps://github.com/rhashimoto/wa-sqlite https://github.com/rhashimoto/wa-sqlite
- sgbeal 2y ago> OPFS finally adding a filesystem to the browser made seem like the web file database situation could finally standardize but COOP/COEP ruins it. We have two OPFS-based VFSes. One requires COOP/COEP and one does not. Each makes feature trade-offs, though, so they're not equivalent. We also offer persistence via localStorage and sessionStorage, so OPFS is not (for small databases) required for persistence.