Not needing a C compiler on your build machine + not having the (infrequent, to be fair) hideously long build times you get when using mattn/go-sqlite3.
Thanks, I think you’re right and that cgo is the main reason to skip mattn/go-sqlite3 in some contexts. :)
On the other hand, modernc.org/sqlite is advertised as a “cgo-free” sqlite driver, so if “no-cgo” was the goal, maybe GtS could have used this instead of mattn’s driver. I would understand the need for WASM if it improved performance over the others, but this article seems to contradict that idea a bit (at least regarding memory, these numbers look very weird).
So I’m still confused, sorry. Maybe I need more caffeine. :)
Meanwhile on my own ActivityPub services the way to use different sqlite implementations is just:
I’m sorry if that is off-topic, but what does GtS gain from having a WASM-based sqlite driver?
Not needing a C compiler on your build machine + not having the (infrequent, to be fair) hideously long build times you get when using
mattn/go-sqlite3.Thanks, I think you’re right and that cgo is the main reason to skip
mattn/go-sqlite3in some contexts. :)On the other hand,
modernc.org/sqliteis advertised as a “cgo-free” sqlite driver, so if “no-cgo” was the goal, maybe GtS could have used this instead of mattn’s driver. I would understand the need for WASM if it improved performance over the others, but this article seems to contradict that idea a bit (at least regarding memory, these numbers look very weird).So I’m still confused, sorry. Maybe I need more caffeine. :)
My understanding was that GtS does use modernc’s sqlite, and this is why it’s broken on OpenBSD (for now?).
Checked and it looks like there’s a build-time choice between
modernc.org/sqlite(transcoded Go) andgithub.com/ncruces/go-sqlite3(wrapped WASM)