-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving to IndexedDB instead of memfs #283
Comments
Hi! I have recently implemented some logic in my own code (not part of wasmer) that synchronizes a memdb with an IndexedDB. It takes advantage of Feel free to copy my source 😄 I am afraid the (brilliant) TypeScript implementation of the wasmer runtime has been abandoned for now, so I do not much expect it to progress. But if you happen to add some functionality I am sure they will appreciate PRs. |
Thanks will take a look. When writing to memfs does it individually store each file to the db and remove the file from memfs to clear space or does it just place whatever is inside memfs to indexeddb similarly to emscripten idbfs? My only concern would be how this deals with reading large file streams from db without loading anything to memory. |
Ah, it's not very smart tbh. It makes a clone of whatever is in the memfs, which it stores in the IndexedDB. Then when you reload the page it reads the entire DB back to memory. Indeed for large files this would be infeasible. |
Thanks for the quick reply. That's useful to know. |
Hello
Is it possible to have a configuration that allows the executing WASI/WASM packages to store to a persistent storage provider such as IndexedDB rather than memfs?
Also my other question is slightly unrelated but can wasm-terminal also run WASM or only WASI packages?
Thanks!
The text was updated successfully, but these errors were encountered: