Using static libraries

It is true (How to enable build.zig also emit header file? - #6 by castholm)
But I successfully generate headers (use -femit-h without path)

Yes, having a .h file makes it easy to use the library from almost any language (directly from C,C++, using bindgen from Rust, using cgo from Go,…)

Having a zig file helps zig users, but it is better to export the library also as a zig module by adding it as a module in build.zig and build.zig.zon (How to package a zig source module and how to use it).

2 Likes