ZIG
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
Zig Preview.
At a glance
| Purpose | Zig source code: a systems language with comptime evaluation. |
| Extensions | .zig |
| Poka parser | poka-zig |
| Viewer | poka-metadata-card-viewer |
| Depth tier | Metadata card (see Depth tiers) |
| Breadth tier | B4 Summary (see Breadth tiers) |
How much Poka reads
B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-zig/src/main.rs (308 lines) and plugin.json in full. The crate has no unit tests and no tests/samples.rs, and the corpus has no .zig sample, so the tier rests on reading the code. Covers .zig. The output is a metadata card of counts found by matching text line by line: @import targets, fn, const and var declarations, struct, packed struct, union and enum, extern and async fn, comptime, try and catch, error sets and line counts. Judgement: B4, because the structure is summarised but the source itself is never shown.
What Poka does not read
- The source text is not shown: the card carries only counts and a few sample names, with no code view or highlighting
- Constructs are found by matching text line by line, not by parsing, so multi-line declarations, nested or indented definitions and keywords inside strings or comments can be miscounted
- Counts of named items stop where their name list is capped (fns at 64, consts at 32, variables at 32), so a larger file under-reports them
- Files over 32 MiB are cut to the first 32 MiB (the card says so)
- Text that is not UTF-8 is decoded with replacement characters; no other encoding is tried
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- tree-sitter-zig (candidate; MIT; C; https://github.com/tree-sitter-grammars/tree-sitter-zig) — Zig grammar for tree-sitter; Rust bindings published via crates.io. Needs a C compiler, so wasm32 build is non-trivial.
- zigsyn (candidate; MIT; Rust; https://docs.rs/crate/zigsyn/latest) — Pure Rust Zig scanner and parser producing an AST; version 0.1.0, early release.
Sources
- parsers/poka-zig/src/main.rs
- parsers/poka-zig/plugin.json