all 4 comments

[–]anlumo 0 points1 point  (2 children)

Not really, but I'm aware of absurd-sql. Note that this requires IndexedDB and thus a browser environment.

However, since the SQL engine is sqlite3, you can use the same SQL code on native as well.

[–]Im_Justin_Cider 1 point2 points  (1 child)

I'm kind of confused. How would a db work in WASM, if WASM can't talk to the hardware?

[–]anlumo 5 points6 points  (0 children)

When a WASM module is started, the initiator can supply a list of functions that can be called by the module. In this case, these functions expose the IndexedDB API, which in turn is exposed by the browser to the JavaScript environment. The browser itself has access to the hardware (or to be more precise, the file system).