Implement generated packet wire codecs (#47)
Some checks failed
Native code generation / deterministic (push) Successful in 4m29s
Imaging and meshing gate / native (push) Failing after 16s
JPEG 2000 feature / linux (push) Failing after 59s
Skia feature / linux (push) Failing after 1m37s

This commit is contained in:
2026-08-09 08:16:32 +00:00
parent 5bc22bdd83
commit 74801c3488
16 changed files with 87505 additions and 25470 deletions

View File

@@ -51,6 +51,17 @@ receive the same zero defaults as the golden generator. The generated `Length`
metadata intentionally preserves the golden generator's variable-block count
semantics.
The same output contains the native wire implementation for every generated
packet and block. It preserves high-, medium-, and low-frequency headers,
network-order packet IDs, sequence numbers and appended ACKs; the reference
field endianness and widths; one- and two-byte variable prefixes; fixed-field
padding and truncation; fixed and variable block counts; normalized quaternion
encoding; zerocoding boundaries; and the reference `ToBytesMultiple` splitting
rules. Readers use checked bounds and allocation arithmetic and reject unknown
IDs or truncated payloads without panicking. Generated tests round-trip all 483
packet types and exercise every truncation boundary, while focused fixtures
assert exact reference bytes and malformed-input behavior.
Generation also compares all packet, block, field, field-type, and `PacketType`
entries against the pinned compiled public API catalog. This rejects a template
parser or naming change even if the emitted Rust would otherwise compile. The