Zig 0.4.0 Released

Zig 0.4.0 Released

Have a look at their writeup: Porting Zig to NetBSD – a fun, speedy port

NetBSD is limited to Tier 2 Support due to lack of a continuous integration service, as well as a missing implementation of building the system’s libc startup files lazily from source. The higher level command line interface (or the corresponding Zig Build System API) is recommended instead, for a few reasons:

Here’s an example of Zig building some C code:

You can use to see what C compiler command this executed:

Note that if I run the command again, there is no output, and it finishes instantly:

This is thanks to Build Artifact Caching. By default, Zig no longer looks in system paths for C header files, instead relying only on what Zig ships and what users explicitly request with .

Source: ziglang.org