A faithful Rust port of upstream checklinks.awk — the IANA tzdb Zone/Link graph consistency
checker. It verifies every Link resolves to a real Zone, names don't collide, links don't point at
links (outside vanguard form), #= shortcut links agree with their targets, and (with backcheck) links
live in the backward file. Diagnostics go to stdout with an exit status (0 = clean).
It is a source-QA layer of the Rust tzdb toolchain:
ziguard-rs source-profile transform
zishrink-rs compact-source emission
checktab-rs table consistency checker
checklinks-rs Zone/Link graph consistency checker <- this crate
zic-rs compilation to TZif
zdump-rs behaviour witness
checklinks-rs does not define tzdb policy or civil-time truth — it reproduces the upstream check.
cargo install checklinks-rs
checklinks-rs --tzdb-dir . # back.ck (source, backcheck=backward) + links.ck (tzdata.zi)
checklinks-rs --backcheck backward africa antarctica … backward
checklinks-rs tzdata.zi # link-graph check of a compiled tzdata.ziThe verdict (stdout + exit) matched against the real awk oracle:
- Pinned 2026b (
tests/oracle.rs): bothback.ckandlinks.ckyield the pass verdict (exit 0, no output), byte-for-byte ==awk -f checklinks.awk. Admitted sourceffad46a0…+ OpenPGP GOODSIG. - Negative fixtures (
tests/cases.rs): 8 malformed-graph cases (link-to-nowhere, link-to-link, duplicate link/zone, link-same-name-as-zone, link-to-both, backcheck) — each reproduces awk's exact stdout and exit. - All IANA releases (
reports/release-all/): across 48 signed bundles (2016g→2026b), checklinks-rs reproduces the 2026b-checklinks verdict set on every release tree (48/48, zero port bugs); 13 reproduce the release's ownchecklinks.awkbyte-for-byte; 35 are check evolution. - Kani (
reports/kani/): the field-index arithmetic is total. Fuzzing (reports/fuzz/): 399,849 runs, 0 crashes.
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testIt claims: to reproduce the 2026b checklinks.awk verdict (diagnostics + exit) for admitted
releases, and byte-exact output where the upstream check is unchanged.
It does not claim: to define tzdb policy or civil-time truth, be a stricter checker, reproduce older releases' verdicts when the check differs, or that multi-issue END output matches gawk's hash order (the verdict set is identical; checklinks-rs sorts for determinism).
Zero runtime dependencies. #![forbid(unsafe_code)].
Apache-2.0. Upstream checklinks.awk is in the public domain (Paul Eggert); this is an independent Rust
reimplementation.