Re:Zig cc: A drop-in replacement for GCC/Clang (2020)
by slimsag on Sunday July 18, 2021 @04:39PM
(#27876474)
I'd argue it's less about what the compiler does by default, but rather what it (and the community) enable.
For Mach (the Zig game engine I'm working on), I have a Zig build script which fetches the required parts of the macOS and iOS SDKs from GitHub to enable cross compilation from Windows/Linux -> macOS. Zig's linker, zld, enables that to work easily.[0]
For SDL.zig, they have also achieved cross compilation for most targets out of the box[1].
Contrast this to say, Go or Rust, where most GLFW and SDL bindings require mucking around with the system dependencies. It doesn't just work out of the box, I think that's really unfortunate and hope other languages work more towards painless installation of C-binding dependencies.
Re:Zig cc: A drop-in replacement for GCC/Clang (2020)
by p0nce on Sunday July 18, 2021 @03:17PM
(#27875708)
> Just make it easy for developers to get the targets they need, but don't ship everything by default.
It seems to be what Flutter is doing, and it must be a ton of work.
I don't see shipping all targets all the time to be a particularly scalable solution in general. When you start including all libraries necessary to develop actual apps, the download size will eventually get so big that people will complain. Just make it easy for developers to get the targets they need, but don't ship everything by default.