ZIG(1)
β¨ ZIG(1) β¨
okay bestie, gather round, because we're about to talk about the zig compiler and honestly? it's giving everything. this is the zig compiler and build tool, and it lives in section 1 of the manual, aka User Commands, aka the fun section π
πΈ SYNOPSIS πΈ
zig [command] [options]
that's it. that's the whole vibe. a command, some options, go off π
π¦ DESCRIPTION π¦
so here's the tea β zig is a whole toolkit, not just a compiler. it does builds, it does tests, it does C interop, it does documentation, it literally minimizes your bug reports. the way that one binary does like twenty jobs?? main character energy fr fr.
π Commands π
here's every command, no cap, nothing skipped:
buildβ Build project frombuild.zig. the classic, the icon, the one you'll type a thousand times.fetchβ Copy a package into global cache and print its hash. fetch the tea, get the receipts π¦initβ Initialize a Zig package in the current directory. brand new project, fresh start, slay.build-exeβ Create executable from source or object files. an actual runnable lil guy πbuild-libβ Create library from source or object files. for when you're being reusable.build-objβ Create object from source or object files. the humble object file, lowkey underrated.testβ Perform unit testing. because we test our code in this house π§ͺrunβ Create executable and run immediately. build and yeet, one step, obsessed.ast-checkβ Look for simple compile errors in any set of files. the little syntax vibe check π΅οΈfmtβ Reformat Zig source into canonical form. canonical form is the only form, periodt β¨reduceβ Minimize a bug report. shrink your cursed repro down till it's small and cute πtranslate-cβ Convert C code to Zig code. C to Zig, glow-up complete π¦arβ Use Zig as a drop-in archiver.ccβ Use Zig as a drop-in C compiler.c++β Use Zig as a drop-in C++ compiler.dlltoolβ Use Zig as a drop-indlltool.exe.libβ Use Zig as a drop-inlib.exe.ranlibβ Use Zig as a drop-inranlib.objcopyβ Use Zig as a drop-inobjcopy.rcβ Use Zig as a drop-inrc.exe.envβ Print lib path, std path, cache directory, and version. the "where am i" command, we love her πhelpβ Print this help and exit. hi bestie, here's the menu πstdβ View standard library documentation in a browser. docs in the browser, cozy reading time πlibcβ Display native libc paths file or validate one.targetsβ List available compilation targets. so many platforms, so many possibilities πversionβ Print version number and exit.zenβ Print Zen of Zig and exit. literally printing the Zen of Zig. iconic behavior π§
π General Options π
-h,--helpβ Print command-specific usage. ask the specific command for help and it'll tell you, no gatekeeping π
heads up bestie β this whole page is the general, top-level overview. every one of those commands has its own usage, and-h/--helpis how you find it. don't be out here guessing, mkay? π«Ά
okay that's the page!! written in the voice of a girl who's genuinely obsessed with compilers. for the record, this is version zig 0.14.1, dated January 2026 β so like, fresh. πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- ubuntu resolute: zig0.14 0.14.1~us1-0ubuntu4 Β· MIT
- ubuntu stonking: zig0.14 0.14.1~us1-0ubuntu4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms