Open okikio opened 1 year ago
I believe this needs infrastructure from the web locks api (https://github.com/denoland/deno/issues/15905). @load1n9 has taken a few stabs at it (https://github.com/denoland/deno/pull/16566 and https://github.com/denoland/deno/pull/16346) but it definitely isn't trivial. I'm working on a polyfill at the moment and ran into this.
This would be nice.
SQLite's official WASM module is using OPFS.
import sqlite3InitModule from "npm:@sqlite.org/sqlite-wasm";
const sqlite3 = await sqlite3InitModule();
const db = new sqlite3.opfs.OpfsDb("my-db", "c");
// ...
Currently with Deno it's possible to use in-memory databases with official SQLite WASM module.
const db = new sqlite3.oo1.DB()
// ... this works, but one must then serialize database to store it
@Ciantic Yeah, this would be amazing.
opfs would be awesome, esp if i could implement it on deno kv or indexdb, or actual filesystem
OPFS seems to be the standard way for Web Apps to write to temp storage, files and folders they'd need to work with. It would be cool and convinient if Deno supported OPFS out of the box like it currently does for the Cache API. IMO, that would allow web apps to have ultimate compat with Deno.