libsql-client-ts icon indicating copy to clipboard operation
libsql-client-ts copied to clipboard

[@libsql/client-wasm] use `sqlite3Worker1Promiser` instead of `sqlite3InitModule`

Open kwaa opened this issue 9 months ago • 1 comments

The current implementation runs in the main thread, making OPFS unavailable.

https://github.com/tursodatabase/libsql-client-ts/blob/fbf8f63866304bcd8a3f364f03e6bba79eb62010/packages/libsql-client-wasm/src/wasm.ts#L34

  • https://github.com/sqlite/sqlite-wasm#in-a-wrapped-worker-with-opfs-if-available
  • https://github.com/sqlite/sqlite-wasm#in-the-main-thread-without-opfs

kwaa avatar Jan 26 '25 08:01 kwaa