3 ms·
I also have this implemented and ready to go in my Go SQLite driver: https://github.com/ncruces/go-sqlite3/blob/main/litestream/example_test.go https://github.c
by ncruces 10mo ago
I also have this implemented and ready to go in my Go SQLite driver:
https://github.com/ncruces/go-sqlite3/blob/main/litestream/example_test.go https://github.com/ncruces/go-sqlite3/blob/main/litestream/e...
Slightly different API (programmatic, no env variables, works with as many databases as you may want), but otherwise, everything should work.
Note that PRAGMA litestream_time is per connection, so some care is necessary when using a connection pool.
- apitman 10mo agoncruces/go-sqlite3 was the first thing I thought of when I saw .load litestream.so. That's awesome that you've implemented this. Was it a big lift to make it work with wasm?
- ncruces 10mo agoNot really, no. Litestream is made in Go, and I have the VFS API well covered. The bigger issue is Litestream is not really meant to be used as a library. It depends on the modernc driver, and some bits on mattn, APIs not very stable, just got updated to require Go 1.25 when 1.24 is still a supported version, brings a bunch of non optional dependencies for monitoring, etc. Eventually I had to fork to make these more manageable. I'd still hope Litestream can be made more modular, and I can depend directly on upstream.