3 ms·
I used the wasm build of sqlite and the Chicory runtime to create a pure JVM executed sqlite library: https://github.com/dylibso/sqlite-zero https://github.com/
by bhelx 2y ago
I used the wasm build of sqlite and the Chicory runtime to create a pure JVM executed sqlite library: https://github.com/dylibso/sqlite-zero https://github.com/dylibso/sqlite-zero
It's more of an experiment than an attempt to make something production ready, though I could see it being useful to bring dependency-less sqlite tooling to the JVM ecosystem.
- ncruces 2y agoWhat's the file system access like, WASI?
- bhelx 2y agoChicory has some partial wasip1 support. https://github.com/dylibso/chicory/tree/main/wasi https://github.com/dylibso/chicory/tree/main/wasi. We use jimfs to keep things simple and secure (and not worry about exposing the real filesystem): https://github.com/google/jimfs https://github.com/google/jimfs When I did this experiment a few months ago, what we could accomplish was pretty limited. I could load and query databases, but not write to them. However the Chicory wasip1 implementation is advancing. BTW, we've borrowed a few ideas from wazero so thanks for your work there :)
- ncruces 2y agoIf the goal is to improve Chicory WASI support, this is the way. If the goal was pure Java SQLite¹, a VFS from scratch would be better. I think since I started my Go/wazero effort, WASI+SQLite improved a bunch. I had to start with the demo VFS; the Unix VFS now builds. But custom VFS is still the way to go, IMO. And thanks! My contributions to wazero were tiny. Best of luck with Chicory! 1: strong NestedVM vibes here; 11 years ago… gosh, I feel old now. https://stackoverflow.com/questions/18186507/pure-java-vs-native-sqlitejdbc-driver-and-nested-vm https://stackoverflow.com/questions/18186507/pure-java-vs-na...
- bhelx 2y ago> If the goal was pure Java SQLite¹, a VFS from scratch would be better. agreed, though this was more an experiment to test Chicory once we built initial wasi support. I'd love to see it picked up and improved. I think that's the direction I'd go if i want some kind of production ready library.