2 ms·
I'm quietly confident that you could compile sqlite with a rust extension into a single .wasm file. The first thing I'd try is to use crate-type = ["staticlib"
by josephg 4y ago
I'm quietly confident that you could compile sqlite with a rust extension into a single .wasm file.
The first thing I'd try is to use crate-type = ["staticlib"] to compile the sqlite extension to a static .a file (cargo build --target wasm32-unknown-unknown), and compile sqlite to a staticlib separately then link them together into a .wasm file and run wasm-opt & friends on that.
There might be some configuration needed to let the extension know the sqlite functions its calling will be linked together later, but that should all be possible. Maybe with some whack-a-mole of wading through compiler versions and build flags and whatnot.