←back to thread

Sqlite3 WebAssembly

(sqlite.org)
539 points whatever3 | 2 comments | | HN request time: 0.409s | source
Show context
koeng ◴[] No.41851815[source]
For use in Golang, I really like ncruces wasm SQLite package - https://github.com/ncruces/go-sqlite3 . Unlike cznic's go package (which is great, btw), the wasm version works well on OpenBSD and the like.
replies(1): >>41853244 #
ncruces ◴[] No.41853244[source]
Author here. If you're interested, do ask questions.
replies(2): >>41853458 #>>41855097 #
1. infogulch ◴[] No.41855097[source]
Hey how's the mmap-based shared memory WAL approach working out? It's been about half a year since you finished the implementation and I only see one issue about it on the tracker, a good sign?
replies(1): >>41856487 #
2. ncruces ◴[] No.41856487[source]
It's turning out great, I guess.

The current approach is not portable to Windows, but it works fine on Linux, macOS, BSD and illumos. In general, portability is hindered more by file locking (I hate POSIX locks) than mmap.

The currently open GitHub issue is more bad default configuration than anything else. Configuring connections to use less memory by default should fix it.

I already have a PR ready for the next release that also opens this up for 32-bit platforms.

Also, GoToSocial (a self-hostable Mastodon alternative) moved to it (from modernc) for its first beta release.

https://github.com/superseriousbusiness/gotosocial