←back to thread

Sqlite3 WebAssembly

(sqlite.org)
506 points whatever3 | 1 comments | | HN request time: 0.3s | source
Show context
TiredGuy ◴[] No.41851263[source]
So after downloading from the official downloads page and stripping away all the mjs files and "bundler-friendly" files, a minimal sqlite wasm dependency will be about 1.3MB.

For an in-browser app, that seems a bit much but of course wasm runs in other places these days where it might make more sense.

replies(8): >>41851337 #>>41851618 #>>41851622 #>>41851724 #>>41851840 #>>41852258 #>>41854092 #>>41855860 #
1. ncruces ◴[] No.41851840[source]
For server side, you'll likely need a different build of Wasm SQLite, that handles concurrency (and file locking) differently.

Also, WASI is very far from answer (so far). The SQLite amalgamation builds fine for WASI but concurrency is an unsolved issue.

I had to build a VFS from scratch to get my Wasm based SQLite driver into a usable shape.

https://github.com/ncruces/go-sqlite3/blob/main/vfs/README.m...