Reconsider wa-sqlite
"That said: i recognize that your understanding of the wider implications exceeds mine and i'm wide open to suggestions."
https://sqlite.org/forum/info/a2f573b00cda1372
Evolu used wa-sqlite, but switched to the official SQL WASM. I think we should rethink that decision.
https://github.com/rhashimoto/wa-sqlite/
https://github.com/rhashimoto/wa-sqlite/discussions/173
Maybe that one will work with Firefox Offilne Mode as well https://github.com/evoluhq/evolu/issues/424
@negue That's perfectly possible.
Would wa-sqlite support encryption as well? cc https://github.com/evoluhq/evolu/issues/291
Sure
Would wa-sqlite support encryption as well?
@negue None of the example VFS classes in the wa-sqlite project include encryption. I'm not aware of any third-party efforts to combine encryption with wa-sqlite.
SQLite3MultipleCiphers might work with some VFS classes if you can get it to build in your own wa-sqlite fork. I haven't used it myself, but its description says it is implemented as a shim VFS that calls an underlying VFS to perform the actual I/O. This won't work with a number of the example VFS classes because they parse the database header, but I think it would work with the OPFS classes other than OPFSPermutedVFS.
The SQLite3MultipleCiphers approach performs encryption above the actual VFS (i.e. the VFS only sees encrypted data). An alternative would be to modify the read and write operations in an existing VFS class to perform encryption below the VFS code. This would be more difficult and requires that you know/learn a bit more about both VFS internals and cryptography, but it is a viable option in case SQLite3MultipleCiphers doesn't work out.
@rhashimoto Thank you for the correction.
Closing as this is no longer relevant—the new Evolu launches tomorrow. Feel free to reopen if it becomes relevant with the new Evolu.
Support for wa-sqlite would be nice, for using Evolu in browser extensions (even without encryption support). Background scripts in chrome extensions have issues with OPFS based sqlite-wasm worker.
We can make it optional, let's discuss it on our discord