Hacker News new | past | comments | ask | show | jobs | submit login

Well, many of us certainly aren't happy living with the annoying syntax and arcane customs of CMake. But - it does get the job done, and incorporates large amounts of arcane knowledge, multiplied over numerous platforms - so that you don't have to. Can I get the same from a Zig-based build system, or build system generator? Can you perhaps link to some comparative review of using zig for building, with the use of CMake?



I don’t have a review, but here’s a significant project using it in a complicated cross platform build with different systems dependencies: https://github.com/raysan5/raylib/blob/master/build.zig

They also have a cmakelists.txt and pile of other cmake stuff to compare against: https://github.com/raysan5/raylib/tree/master/cmake

One of the nicer things is that if you’re working with less technical folks, they only need to download the zig binary because it bundles the entire toolchain. Real nice when on corporate windows systems.


> they only need to download the zig binary because it bundles the entire toolchain.

But that can't be possible... neither in principle nor in practice, because each projects needs a different toolchain. Different languages, different tools, different target platforms etc.


Well it’s working in practice so I don’t really know what to tell you.

> because each projects needs a different toolchain

Not true.

> Different languages

I don’t think a caveat for C/C++/zig source files was needed…

> Different tools

If your project is unwilling/able to verify builds on anything except an ancient version of GCC that’s your project’s problem. In practice that’s a minority.

> different target platforms

Zig has 1st class cross compilation to all major platforms.

If you’re using an embedded target you’ll need to vendor its linker script and boot code which is already the common practice.

I encourage you to try it before dismissing it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: