Zig 0.16 · v0.0.2 preview

Current limitations and honest boundaries

ArchUnitZig prefers explicit missing behavior over apparent parity built on Zig concepts that do not exist or cannot be discovered reliably without running user code.

No automatic build.zig interpretation

Named module imports need a compilation-unit alias table. Zig build files are programs: their module graph can depend on target, options, environment, filesystem state, and control flow. ArchUnitZig does not run them or recognize a misleading subset. Workspace discovery finds package boundaries from manifests; it does not infer compilation roots or aliases. Provide CompilationUnitOverride values explicitly.

v0.0.1 is an immutable preview for exactly Zig 0.16.0, not a stable compatibility promise. Pin both the release archive URL and Zig package hash; upgrade by reviewing a new version rather than tracking a mutable branch.

Literal dependency calls only

The extractor records literal @import, @embedFile, and supported C-import forms. A computed dependency operand is a parser-policy error in strict mode because static analysis cannot name its target without execution.

Traversal is deliberately conservative

Symlinks and Windows reparse points are not followed. Nested marked Zig projects are traversal boundaries by default, and nested .archignore files do not alter the located root's policy. Existing relative targets are canonicalized against the project root, and paths leaving that root remain external/outside rather than being silently folded into the project graph.

No class-oriented metrics

There is no class/interface rule surface, inheritance policy, LCOM, abstractness, distance-from-main-sequence, or zone label. Zig declarations, containers, source structure, imports, graph coupling, and user-defined metrics are the supported vocabulary.

Slice support follows Zig paths

Slices are projected from normalized file paths and dependency edges. Sibling-library conventions that depend on runtime namespaces, class packages, or language-specific annotations are not copied when they have no Zig representation.

The parser follows Zig 0.16

ArchUnitZig's syntax behavior, standard-library APIs, and package wiring target Zig 0.16.0. A future Zig upgrade is a reviewed compatibility undertaking, not an implied floating guarantee.

Compiler API docs complement this guide

Zig's generated API reference exposes the public facade but is not a substitute for ownership rules and domain semantics. This guide uses compiled source examples; consult both surfaces when writing a new rule.

Found a boundary that should move? Open a focused GitHub issue with a Zig fixture and the expected structured result. A concrete language example is more useful than parity stated only in sibling terminology.