Expand description
Wire format: line-delimited JSON over a duplex byte stream. Each
request is one JSON object on one line; each response is one JSON
object on one line; lines end with \n. No length prefix — the
framing is the newline. NDJSON keeps tools such as nc -U piped
through jq usable for ad-hoc poking. The same frame shapes ride
the HTTP-over-TCP transport (NDJSON over chunked encoding).
Structs§
- EndMarker
- Empty marker payload for the
Endoutcome. Encoded as{}so future fields (e.g. a final summary) can be added without breaking the wire shape. - Request
- Client → server frame.
- Response
- Server → client frame.
- Wire
Error - Structured error frame.
messageis a human-readable summary;details, when present, carries verb-specific structured context (compile error site, timeout stage, etc.) that the CLI can render alongside the message.
Enums§
- Response
Outcome - Successful result or structured error. Flattened into
Responseso the wire shape is{"id":N,"result":{...}}or{"id":N,"error":{...}}rather than a nestedoutcomekey. - Wire
Error Kind - Error category. The full string message carries detail; the kind is the machine-readable discriminator.
Functions§
- encode_
line - Encode a value as JSON and append
\n. Centralises framing so server.rs / client.rs share one implementation.