-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to load in a Cloudflare Workers script #47
Comments
The package is primarily thought for the browser. It may be possible to get it to run in non-browser environments, but not necessarily. For example, it is known to not currently work on Node.js. If you manage to get it to run on Cloudflare Workers, happy to add a link to documentation to do so in the |
Thank you @tomayac! I intend to open a bounty to figure out the details and write up instructions for how to get it to work. Would it be okay for such a writeup to be created in this thread, or do you prefer it in an external blogpost? I want to be mindful of not creating unwanted work for you and the team. |
Thank you! Ideally this documentation would live somewhere on someone's blog, or maybe on StackOverflow or so. Just to make clear that it's distinct from the project. Should this library end up being usable on more platforms, like Node in the future, we would of course document it here. |
Ha! Pun probably not intended ;). @sorenbs in the upstream library we have a build which supposedly works with node.js, but none of the upstream devs (🙋) actually use node in any capacity, so we have to rely on the reports of users that it works. The wasm dist file: https://www.sqlite.org/download.html (search that page for "wasm") contains a file called sqlite3-node.mjs which you "should" be able to use as a basis. It is not available via npm (none of have any use for npm, either!). Feel free to contact me (stephan sqlite org) if you have feedback for that build (like "it doesn't work at all" or "it works if you change this one part..."). If you can get that working without having to go through npm then we will be happy to host a howto doc on sqlite.org/wasm. Edit: PS: the prerelease snapshps at https://sqlite.org/wasm/uv/snapshot.html are newer, based on yesterday's trunk. That shouldn't affect you for most stuff, but may if you intended to use one of the OPFS-backed VFSes, as those have received small additions since the 3.43 release. |
Some Node.js experiments in #48. |
Running in-memory SQLite on Cloudflare Workers has a number of use cases.
Cloudflare Workers supports WASM, and previous work by the community suggests that it is possible to get a wasm version of SQLite to run in a workers script.
Documenting how to get the official SQLite WASM distribution to work on Cloudflare Workers would be a great help.
The text was updated successfully, but these errors were encountered: