Any idea how to use this library <https://www.npm...
# webassembly
s
Any idea how to use this library https://www.npmjs.com/package/@sqlite.org/sqlite-wasm With kotlin wasm for browser
e
there is no way to call other wasm modules directly, wasm interop is only defined with js. so use its js interface, same as any other js library
b
https://github.com/IlyaGulya/TodoAppDecomposeMviKotlin/tree/feature/migrate-to-wasm branch by @ilyagulya shows how to do it. I used that as a reference for my own app
you'll need to refer to his open branch against sqldelight https://github.com/sqldelight/sqldelight/pull/5534 ask LLM to help you publish a version of sqldelight to mavenLocal from that branch. You can also look at his test code there and just modify it slightly to use sqlite-wasm
i
Wow, I've already forgotten about this branch in the Todo app sample 🙂 I'm thinking about publishing a fork of sqldelight with wasm enabled
🙌 3
b
Have you taken a stab at using a SharedWorker at all to work with sqlite-wasm to allow for concurrent db access from multiple tabs?
i
Not yet 🙂 I suppose it should be an application specific decision and we should just provide necessary APIs