SQLite in the browser with WASM/JS
> … support persistent client-side storage using available JS APIs. As of this writing, that includes the Origin-Private FileSystem (OPFS) [0]<p>This is really good news, and exactly what the OPFS was designed for.<p>You may have seen “Absurd SQL” [1] which was a proof of concept for building a SQLite Virtual FS backend using IndexedDB. It provided full ACID compliment transactions. Incredible work but a hack at best.<p>The OPFS supersedes all that and makes it possible to have proper consistent and resilient transactions.<p>WASM SQLite with the OPFS is the future of offline first web app development. The concept of a single codebase web/mobile/desktop app with proper offline storage is here.<p>What I really want to see next is an eventually constant sync system between browser and server (or truly distributed with WebRTC). The SQLite Session Extension [2] potentially has the building blocks needed for such a system.<p>0: <a href="https://webkit.org/blog/12257/the-file-system-access-api-with-origin-private-file-system/" rel="nofollow">https://webkit.org/blog/12257/the-file-system-access-api-wit...</a><p>1: <a href="https://github.com/jlongster/absurd-sql" rel="nofollow">https://github.com/jlongster/absurd-sql</a><p>2: <a href="https://www.sqlite.org/sessionintro.html" rel="nofollow">https://www.sqlite.org/sessionintro.html</a>