by cube2222 · 4y ago · 0 comments
It's really cool because cross-compilation is, imo, the most painful part of CGO - right after being incompatible with the whole runtime model, being blocking, and being hard to profile with Go profiling tools.
[0]: https://dev.to/kristoff/zig-makes-go-cross-compilation-just-...
Disclaimer: Not affiliated with the author in any way.
Getting the right libs is really the hardest part of cross compiling, and zig can't really help there. Not to crap on zig, it's pretty badass, just offering a well battle tested alternative.
I'm now using https://github.com/crawshaw/sqlite and it seems to address those issues (but I haven't gotten around to setting up a proper test to confirm). It may be worth perusing if you do run into performance problems. It does come with the caveat of not being a database/sql driver though.