Files
irtt-rs/crates/irtt-proto
Nils Andreas Svee 328ff17901 docs(irtt-proto): add runnable doctests for public API
Add executable doctests documenting the consumer-facing contract of
irtt-proto: the directional request encode/decode/verify split, Params
construction and round-trip, omitted-vs-explicit-zero presence, open and
echo reply round trips, packet length calculation, and HMAC verification.

No conventional tests are migrated: every existing irtt-proto test
exercises wire vectors, flag matrices, malformed input, layout rules,
HMAC error behavior, or encode/decode round trips, which the crate's
AGENTS.md treats as durable compatibility coverage rather than
documentation cleanup targets.
2026-09-24 16:29:40 +07:00
..

irtt-proto

Low-level wire encoding and decoding for the IRTT-compatible protocol: request and reply structs, flags, negotiable parameters, varint/zigzag primitives, and HMAC-MD5 packet authentication. No sockets, no runtime, no session state.

Who should use this

Most applications should not depend on this crate directly. Use irtt-client to run client sessions or irtt-server to run a server; both build on irtt-proto and provide session lifecycle, negotiation, and validated configuration on top of it.

Reach for irtt-proto directly only if you are implementing another IRTT-compatible client or server from scratch and need the raw packet layer.

Field values mirror the wire format closely rather than expressing policy: Params::decode rejects malformed input, but direct construction plus Params::encode performs no additional validation — callers are responsible for validating values before sending them.

Documentation

Full API documentation is on docs.rs/irtt-proto.

Project

Part of irtt-rs, an independent Rust implementation of an IRTT-compatible protocol stack.