Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't zig good tool for this as well? I've seen it being used in passing [0] - is this reasonable thing to do and we may see more of it?

[0] https://github.com/ggerganov/llama.cpp/blob/master/build.zig



Zig is the {cross,}compiler and the build tool and the package retriever (no package repository) all in one.


Why Zig is better than some other programming language?


It easily cross-compiles to any target it supports, and natively handles C and C++ dependencies. Much of the complexity of supporting builds in other languages comes from the inclusion of object code in C or C++, so using Zig gives a leg up with that. It also handles caching quite cleanly.

I don't think it's an obvious choice for literally everything, at least not yet. But I'd suggest strongly considering it as a build tool for object-code-heavy applications, even if they don't use the Zig language itself.


People use it as better c compiler and build system without using zig per se.




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

Search: