sqlite
sqlite copied to clipboard
Alternative approach
Consider you compiled sqlite to wasm and then run it under a wasm interpreter https://github.com/perlin-network/life and implemented the sqlite https://www.sqlite.org/vfs.html interface in go.
Not saying one way is better or worse, just a consideration, depending on how difficult the compilation from C is.
edit: from the current state of wasm, you would need one wasm VM instance per sqlite connection.
Thanks for the idea. It sounds interesting but it's improbable I would have the resources to explore it any time soon. But considering C to wasm compilers do already exist, IINM, it could be a lot of fun for someone else to try out. In any case thanks for bringing github.com/perlin-network/life to my attention, I haven't heard about it before.
Indeed, your libc project is interesting, generalizing the approach could be decent to bring lots of C libs and interpreters to pure go at least from the end users point of view. Maybe a good experiment for another day.