Rust implementation of IDBBatchAtomicVFS? #154
Replies: 1 comment 4 replies
-
I don't really understand your question, but I also don't know anything about Rust. On first reading, it sounds like you want a way to use IndexedDB for SQLite storage "entirely in rust" without involving any JavaScript. I don't think that's possible as I don't know of any direct WebAssembly bindings for IndexedDB. If you're instead asking whether you can use the SQLite C API directly in WebAssembly instead of the wa-sqlite wrappers, while still using the IDBBatchAtomicVFS, I think that can be done. I don't think you can use wa-sqlite as-is; I think you'll want to steal pieces of it and incorporate them into your application build. Maybe someone else here will have a better understanding of your goals and better advice. |
Beta Was this translation helpful? Give feedback.
-
Curious if there is any existing work around having a set of native rust bindings to wasm sqlite that can still leverage the IndexedDB-backed VFS.
We have a hybrid application where we have a common rust codebase that cross compiles to wasm for web, with wa-sqlite as a sqlite implementation, and then a native toolchain with a desktop binary of sqlite for our Tauri application.
It would be great to not have to call back out to js in wasm, but just to handle the operations entirely in rust, with the native c bindings. Happy to try and work on this, but just wanted to confirm if I have the right mental model here, and if there are any extreme gotchas. Things we also need:
If anyone has some pointers to prior art, would love to jump on that!
Beta Was this translation helpful? Give feedback.
All reactions