Hi,
Q: I'm a complete wasm newb and am about to start writing a SPA in Rust using yew. My project requires lots of interaction with IndexedDb. My question is can WebAssembly interact with IndexedDb and if so does it have to go though JavaScript first? I've read that I/O heavy applications are actually slower in WebAssembly because of the requirement to go through JavaScript and would like to put my doubts to rest.
Thank you for you time in answering this question!
You can access IndexedDb through the host, you need to import JavaScript functions that interacts with IndexedDb.
Understood. Thank you! :)
A small follow up question: Is there a proposal out there to allow direct access between WebAssembly and IndexedDb? If there isn't should there be one?
Thanks, :)
@russoturisto I believe that is covered by the host-bindings proposal which allows wasm direct access to host APIs (including browser APIs).
You can see an overview of the proposal here.
Awesome! Thank you so much! :)
@russoturisto
I would love to know the outcome. I am thinking about using wasm with indexeddb too
Most helpful comment
@russoturisto
I would love to know the outcome. I am thinking about using wasm with indexeddb too