ZIG(1)

πŸ“¦ version 0.16.0~us1, in ubuntu stonking

πŸ’– NAME πŸ’–

zig β€” the Zig compiler AND the build tool, one iconic little binary doing the absolute most 🫢


✨ SYNOPSIS ✨

zig [command] [options]

🌸 DESCRIPTION 🌸

okay so bestie, zig is literally both the compiler and the build system in one. You pick a command, you throw some options at it, and you go. That's the whole vibe. Here's the full menu of what you can ask it to do πŸ‘‘

🌈 Commands 🌈

  • build β€” builds your project from build.zig πŸ“¦
  • fetch β€” copies a package into the global cache and prints out its hash πŸ”₯
  • init β€” sets up a brand-new Zig package right here in the current directory 🌱
  • build-exe β€” makes an executable out of source files or object files πŸ—οΈ
  • build-lib β€” makes a library out of source files or object files πŸ“š
  • build-obj β€” makes an object file out of source files or object files 🧩
  • test β€” runs unit tests, because we test in this house πŸ’…
  • test-obj β€” makes an object file for unit testing πŸ”¬
  • run β€” makes an executable and then immediately runs it, no waiting, main character energy ✨
  • ast-check β€” sniffs around for simple compile errors in any set of files πŸ•΅οΈ
  • fmt β€” reformats Zig source into its canonical form, and yes it's giving gorgeous πŸ’–
  • reduce β€” minimizes a bug report so you're left with the tiniest little repro πŸ›
  • translate-c β€” converts C code into Zig code, the crossover episode we love to see πŸ”„
  • ar β€” combines object files into a static archive πŸ—ƒοΈ
  • cc β€” uses Zig as a drop-in C compiler, effortless 😌
  • c++ β€” uses Zig as a drop-in C++ compiler, yes she does both πŸ‘‘
  • dlltool β€” uses Zig as a drop-in dlltool.exe πŸͺŸ
  • lib β€” uses Zig as a drop-in lib.exe 🧱
  • objcopy β€” manipulates executables and relocatables πŸ› οΈ
  • objdump β€” prints information about executables and relocatables πŸ”
  • ranlib β€” uses Zig as a drop-in ranlib πŸ“‡
  • rc β€” uses Zig as a drop-in rc.exe πŸŽ€
  • env β€” prints the lib path, std path, cache directory, and version 🌍
  • help β€” prints this help and exits, short and sweet πŸ‘‹
  • std β€” opens the standard library documentation in your browser 🌐
  • libc β€” displays the native libc paths file, or validates one 🐧
  • targets β€” lists every available compilation target 🎯
  • version β€” prints the version number and exits πŸ”’
  • zen β€” prints the Zen of Zig and exits, it's a whole mood πŸ§˜β€β™€οΈ

✨ General Options ✨

  • -h, --help β€” prints the usage for whatever command you're on, super handy when your brain is buffering 😭

and that's the whole page bestie!! no cap, you're basically a Zig girlie now πŸ’…πŸ¦‹

this gorgeous thing is zig 0.16.0, dated May 2026, hanging out in the User Commands section of the manual β€” love that for her πŸ’œπŸŒΈ

πŸ“¦ where this page comes from