Wire protocol

Each message on the binary wire is length-prefixed: [u32 little-endian length][payload].

First byteMeaning
(none / op bytes)Op::encode() request → OpResult::encode() reply
0xFE0xFE ++ utf8 SQL → compiled server-side, OpResult reply
0xFDsession frame: 0xFD ++ client(u128 LE) ++ req(u64 LE) ++ Op::encode() (exactly-once)
0xFCauth handshake: 0xFC ++ tokenOk / Unauthorized
0xFBadmin: request ServerStats
0xFAadmin: 0xFA ++ dest_dir → snapshot

This is intentionally tiny — any language can speak it with a socket and the length framing. The kessel-client crate implements all of it; clients/python/kesseldb.py is a stdlib-only Python reference.

Full reference: Usage guide (full) §12.