Skip to main content

Module structural

Module structural 

Source
Expand description

structural-report — a measured structural-parity inventory of zic-rs TZif output against reference zic (campaign T8).

This is a separate axis from the behaviour oracle. CORE.1 already establishes that every canonical zone behaviour-matches reference zic/zdump over 1900..2040 (the binding contract). This report answers a different question: how do the emitted TZif bytes differ structurally — which is exactly what a “drop-in file replacement” claim would need, and is deliberately not claimed by CORE.1.

For each canonical zone we compile both ways (zic-rs in memory, reference zic into a temp tree), decode both with the shared crate::tzif::parse, and classify the difference into a fixed taxonomy (ParityClass). The point is to measure the distance, not to chase byte parity: behaviour parity stays the contract, structural parity is reported honestly, and byte parity is only ever claimed where a reference blob is pinned (fixtures/expected/).

Empirically (tzdata.zi 2026b vs tzcode 2026b): isutcnt/isstdcnt/leapcnt/typecnt/version /footer are at full parity across all 341 zones (version+footer 341/341 after T8-v3 pinned zic.c’s compat >= 2013 version rule — see compile::posix_footer::recurring). The only remaining differences are timecnt (the documented slim/fat explicit-transition window) and two charcnt zones (zic shares abbreviation suffixes in the designation table; zic-rs stores them separately). All are zdump-equivalent.

Structs§

Shape
A structural snapshot of one compiled TZif file’s authoritative (v2+) block.
StructuralReport
The complete structural-parity inventory for one source file.
ZoneError
A zone that could not be structurally compared (one side failed to compile or decode).
ZoneShape
One canonical zone’s structural comparison.

Enums§

ParityClass
The taxonomy a zone’s structural difference falls into. A zone lands in exactly one class: the single differing dimension when there is exactly one, else a coarser catch-all.

Functions§

build_structural_report
Build the structural-parity inventory for db.