Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by wild_egg on Thursday November 28, 2024 @08:37PM
(#42270047)
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.
[ Parent
| on HN ]
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by AYBABTME on Thursday November 28, 2024 @08:50PM
(#42270108)
Example? Curious, can Zig can be used to simplify CGO dependency management in general, or only for Zig programs?
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by rockorager on Thursday November 28, 2024 @10:39PM
(#42270590)
It 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.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by wffurr on Thursday November 28, 2024 @09:17PM
(#42270230)
Zig is a C compiler. Much like D, you can use it to cross compile any C code.
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by kristoff_it on Friday November 29, 2024 @12:34AM
(#42271117)
Re:Tk9.0: CGo-free, cross platform GUI toolkit for Go
by karel-3d on Friday November 29, 2024 @04:01AM
(#42272324)
I 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?