How to integrate Zig in my build process for c/c++ project

It depends on how many non-Zig external libraries, and how willing are you to rewrite the build scripts for those libraries. I ran into this problem (How to tell Zig not to rerun a certain step?) while trying to use Zig as a compiler to build a library and link it to Zig’s outputs. Compare to CMake, Zig is still not a full fledged build system regarding integrating non-Zig external libraries.

As for using Zig as the build system for C or C++ code base, you can check out Raylib, it’s a big C library that uses Zig as the build system.

3 Likes