Commands
Build, example, test, codegen and quality commands in one place.
5 min read
Your app
These steps come from the template’s templates/minimal-app/build.zig. The app step is registered only for macOS targets.
zig build # build the executable
zig build run # build and run
zig build app # package a macOS .app bundle (zig-out/)
zig build -Dtest-mode=true # enable the automation harness (forwarded to zenit)Examples in the zenit repo
Every example has two steps: zig build <name> produces an ad-hoc-signed .app, and zig build run-<name> runs the executable directly.
Step.app nameWhat it is
hello-buttonHello ButtonMinimal window and buttoncounter-reactiveReactive CounterSignal / Memo / Effect demovirtual-list-perf100k Virtual List100k-row VirtualList stress testtext-inputText Input DemoInput / Textarea with text_coremulti-windowMulti WindowTwo native windows, per-window routingstorybookzenit StorybookAll-component showcase and e2e targetdevtools-probeDevTools ProbeReal-window acceptance for the DevTools performance panelinterop-probezenit Interop ProbeRich clipboard / drag-out system verificationconsole-probeConsole ProbeConsole + DevTools real-window verificationdesign-probeDesign ProbeTarget for design-mockup comparisonzig build run-hello-button
zig build run-counter-reactive
zig build run-storybookTests
Suites
CommandWhat it does
testAlias of test-headlesstest-headlessDeterministic tests; no live Metal device requiredtest-allDeterministic plus live-device Metal teststest-null-backendBuild and run deterministic tests on the Null GPU backend to prove the RHI abstractionUI and reactivity
CommandWhat it does
test-uiUI system tests; -Dtest-filter=<substring> runs only matching namestest-ui-coreui_core integration tests (src/ui/core/tests.zig)test-reactiveReactive system teststest-allocation-campaignSweep allocator failure points across transactional framework boundariesRendering and GPU
CommandWhat it does
test-renderRender module teststest-gpuGPU abstraction teststest-metalTests that need a live Metal devicetest-svgSVG parser / rasterizer teststest-timing-ringFrame timing ring testsText and i18n
CommandWhat it does
test-textText module tests (font catalog / weights)test-text-coretext_core module teststest-text-propertiesDeterministic, seedable text-coordinate property teststest-i18ni18n module teststest-bidi-conformanceFull Unicode 17.0.0 UAX #9 conformance dataPlatform, windows and packaging
CommandWhat it does
test-window-lifecycleDeterministic multi-window lifecycle and routing teststest-text-hook-ownersProcess-wide text-measurement hook ownership stack (closing one window keeps the others’ hooks)test-selector-scaleHiDPI FontSelector scale propagationtest-system-sdkSystem SDK teststest-system-sdk-backendsDeterministic native backend testscheck-system-sdk-crossCompile System SDK tests for Linux / Windows (no run)test-harnesstest_harness (file-RPC) teststest-package-consumerBuild and launch a downstream app against direct and Zig-filtered packagesCodegen and tools
CommandWhat it does
benchPerf baselines: zig build bench [-- filter] [-- json=path]gen-iconsRegenerate the module chosen by -Dicon-set (lucide by default)gen-icons-lucideRegenerate the public Lucide icon modulegen-icons-commonRegenerate the provider-neutral common icon modulegen-icons-untitled / gen-icons-allInternal icon set; internal checkouts onlygen-component-indexAST-scan src/ui and regenerate component_index_generated.zigcapability-matrixPrint the generated macOS capability matrixtext-corpus-dumpPrint the committed T0 text-coordinate corpusBuild options
OptionDefaultEffect
-Dtest-mode=truefalseEnable the e2e harness (file-RPC server)-De2e-port=<n>19816E2E port, used in the default RPC directory name-Dtest-filter=<s>—Run only test-ui tests whose name contains the substring-Dicon-set=<name>lucideBuilt-in icon provider: lucide or untitled (internal only)-Dgpu-backend=<name>metalGPU backend: metal or nullNOTE
Quality scripts
ScriptWhat it checks
./scripts/check_oss_boundary.shStatically checks src/ui imports, then builds hello-button to confirm no forbidden module is reachable./scripts/check_style_literals.shRatchets bare color / font-size literals in examples down, never up (ui.arb escapes are allowed)bash scripts/switch_icon_set.sh lucideRuns test-headless and the storybook build with one icon set, without touching the worktreeTIP
Bundle checks
Example bundles are ad-hoc signed with the quarantine attribute cleared. These commands verify the signature and list any remaining extended attributes.
zig build hello-button
codesign --verify --deep --strict "zig-out/Hello Button.app"
xattr -lr "zig-out/Hello Button.app"