> couldn't a Zig reimplementation of SQLite use comptime for compile-time query compilation? Including generating native code for fixed queries?
SQLite already compiles queries into opcodes and then uses its own VM to interpret them. You would have to reimplement the internal VM.