Type-safe protocol description language for network binary formats.
Declaratively describe your binary protocol and get safe, zero-allocation C and Rust parsers/serializers — no hand-written byte manipulation, no buffer overreads, no endianness bugs.
@endian big
module net.udp
packet UdpDatagram {
src_port: u16,
dst_port: u16,
length: u16,
checksum: u16,
require length >= 8,
data: bytes[length: length - 8],
}
wirespec compile udp.wspec -t c -o build/ # generates .h + .c
wirespec compile udp.wspec -t rust -o build/ # generates .rscargo build --release
# Binary: target/release/wirespecwirespec compile <input.wspec> -t <c|rust> -o <dir> # compile
wirespec check <input.wspec> # type-check onlyOptions: -I <dir> (include path), --recursive (emit dependencies), --fuzz (libFuzzer harness, C only).
QUIC, TLS 1.3, MQTT, BLE, IPv4, TCP, Ethernet — all defined and tested in examples/.
Full language guide, reference, and cookbook: docs.wirespec.org
| Version | Feature |
|---|---|
| v0.1.0 | Wire formats, state machines, C/Rust codegen |
| v0.2.0 | ASN.1 / rasn integration |
| v0.3.0 | TLA+ bounded verification |
Apache-2.0
Copyright (c) 2026 mp0rta