ZIG(1)

πŸ“¦
version 0.14.1~us1 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

✨ 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 from build.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-in dlltool.exe.
  • lib β€” Use Zig as a drop-in lib.exe.
  • ranlib β€” Use Zig as a drop-in ranlib.
  • objcopy β€” Use Zig as a drop-in objcopy.
  • rc β€” Use Zig as a drop-in rc.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 / --help is 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