Replies: 2 comments 3 replies
-
I'm not sure what you mean by "libmodule". If you mean the libmodule.js (and .c) in wa-sqlite itself, that is for SQLite module support, i.e. virtual database tables. I don't know if you mistakenly thought that was ES6 module machinery, or if there is some incompatibility in that code with the Emscripten workaround. If the latter can you elaborate? Just looking at the workaround without trying it, it looks like it can be applied at the application level where the WASM module is loaded, i.e. without modifications to wa-sqlite. However, I don't know if all the Javascript in wa-sqlite is compatible with node, as I generally use constructs as long as they are supported across the evergreen browsers without checking for node support. I don't really want to do a lot of work to support running in node at the moment, but if you (or anyone) can document how it fails purely due to wa-sqlite (i.e. not in Emscripten-generated code), I would consider making changes if they aren't too burdensome. |
Beta Was this translation helpful? Give feedback.
-
#62 filed for inclusion into the FAQ! |
Beta Was this translation helpful? Give feedback.
-
I've briefly fiddled with wa-sqlite in the Node REPL, and as part of a test script I tried running in Node. On both occasions I was greeted with the following:
The test script consists of the example adapted from the documentation for SQLiteAPI:
I understand that this is due to emscripten-core/emscripten#11792. The issue also contains a comment that proposes a workaround.
Would wa-sqlite have better support for Node, perhaps through incorporating appropriate workarounds into libmodule?
Beta Was this translation helpful? Give feedback.
All reactions