4 ms·
I've been using zig's toolchain in CGo projects for a couple years now and cross compilation _just works_. Maybe there are libraries it doesn't handle well but
by wild_egg 2y ago
I've been using zig's toolchain in CGo projects for a couple years now and cross compilation _just works_. Maybe there are libraries it doesn't handle well but so far all of my use cases have been covered perfectly.
- AYBABTME 2y agoExample? Curious, can Zig can be used to simplify CGO dependency management in general, or only for Zig programs?
- wffurr 2y agoZig is a C compiler. Much like D, you can use it to cross compile any C code.
- rockorager 2y agoIt could definitely work for that. You have to think of zig in this context as a build system which can download and compile C/C++ codebases.
- kristoff_it 2y agohttps://zig.news/kristoff/building-sqlite-with-cgo-for-every-os-4cic https://zig.news/kristoff/building-sqlite-with-cgo-for-every...
- karel-3d 2y agoI have personally hit some roadblock before that I cannot really remember anymore, so I just gave up and used debian docker image. (Which needed to be old enough that it had old glibc, so someone with 10 year old OS doesn't complain. Linux.) zig gets around that by using musl, right? or does it use old libc?