It is quite often to include C library in Zig project. If it is a shared library, just link it in build.zig
.
But if it is not, it can be included as a dependency. Here I use tiny-regex-c
as an example.
First, add the c libaray as a dependency.
$ zig fetch --save=tiny_regex_c https://github.com/shahar99s/tiny-regex-c/archive/refs/heads/master.zip
It will show up in the build.zig.zon
file. Then include it in build.zig