Hey All!
Wanted to post an announcement about a crate we've been working on. It lets you use Diesel ORM + SQLite with OPFS in the browser for persistent in-browser SQLite databases. We're using it for an e2e encrypted group chat SDK, but i'm sure there many more creative uses for it! It could probably be helpful for any web-app that needs fast, light persistent storage.
The crate so far: libxmtp/diesel-wasm-sqlite at wasm-backend · xmtp/libxmtp · GitHub
Will be talking about it live here: XMTP Dev Call: wen group chat web (Tuesday 8/27 9AM PST/12EST)
It's still under active development, but most queries should work! Namely, returning
clause with sqlite does not work yet, because of a private function in diesel.
Will be pulled out into it's own repository and posted on crates as soon as it gets cleaned up a bit.
Before then I'll be talking about it live (link above) if anyone is interested in how it works/wants to offer suggestions for features. Would welcome any WASM experts help me make it more performant. (Figuring out how to share memory between the library host instance, and the separate SQLite WASM blob would be huge) as well as anyone with questions on how to use it!