-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support Sqlite storage type #168
Comments
I guess this would require the use of Sqlite's support for wasm. Not sure what would be involved in wiring that up. |
I don't think we should use Sqlite compiled as Wasm. Instead, we should expose SQLite API via Wasm imports, and use SQLite compiled as a NodeJS bindings from C. It would be probably much faster and easier. |
You mean, build our own wrapper around the sqlite API, and somehow thread that through to the rust layer? That sounds like a lot of work. |
It's probably a lot of work because the Matrix Rust SDK expects rusqlite API entirely. I wonder how it compiles to It's probably more work than maintaining |
Well, the issue exists because nobody really maintains But if doing the work to make our integrations support the maintained wasm bindings is more work than just having someone maintain the nodejs bindings, then that's fine too. The current situation is untenable though. |
Other than the overhead of maintaining two sets of bindings, another advantage of supporting sqlite through the wasm bindings rather than maintaining matrix-rust-sdk-crypto-nodejs would be that you could also use matrix-js-sdk for nodejs projects. |
Yet another option here might be to use https://www.npmjs.com/package/indexeddb, which implements indexeddb backed by the local filesystem. That said, its 35 weekly downloads aren't entirely reassuring. |
In fairness 0.0.1 was only published 4 years ago. I guess if it works, don't change it? |
As part of my quest to look at moving the bots and bridges away from the nodejs binding layer, I'd like to talk about potentially enabling SQLite support for this binding layer. In the NodeJS project, we do https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs/blob/main/src/machine.rs#L113-L155.
The text was updated successfully, but these errors were encountered: