Stream: jco

Topic: WASI to browser storage


view this post on Zulip DougAnderson444 | PeerPiper.io (Jan 10 2024 at 14:16):

@Guy Bedford before I hack together a solution, I thought I'd ask here first...

What are your thoughts on the best way to wire up WASI to Browser storage (ie. localstorage)? I see there are wasi wits for filesystem and io, wondering if you have any insight on the best way to do this in today's day?

Right now I was just thinking of importing a JavaScript handle to a function, but thought perhaps you had alternate ideas?

view this post on Zulip Guy Bedford (Jan 10 2024 at 18:09):

I think ideally JCO offer standard ways of using Web APIs just like wasm-bindgen does, supporting automatic integration of some standard web WITs for things like local storage.

Then if we had that - one could then use a wasi-virt-style approach in JCO to virtualize WASI-fs on top of a browser local storage, all within the component model composition primitives.

Certainly a custom localstorage WIT is a good place to start, but if anyone is interested in tackling some of these problems more generally it would be great to have contributions and I'd be happy to provide guidance.

view this post on Zulip DougAnderson444 | PeerPiper.io (Feb 28 2024 at 13:23):

I took a look at IndexedDB via WIT this week, and it looks like we should probably wait for async to land, as the APIs to browser storage is async.


Last updated: Dec 23 2024 at 13:07 UTC