Files
zeekay c7694a7285 zip in Rust serves on hyper, and an op can stream
An op is an async fn. It may take &zip::Cx (request headers; the
answer's status, headers and trailers) and a zip::Body read as it
arrives, and may answer zip::Sse or zip::Body, each chunk written as
the op yields it. A client that leaves drops the op's stream.

The blocking std::net door is gone: HTTP/1.1 keep-alive and h2c on
one port (hyper_util auto), graceful shutdown bounded by a grace.
The ZAP door runs on tokio and streams with zap-proto/http's head,
data and end frames.

Wire names are serde's: the derive reads rename, rename_all, skip
and with, and the hand-rolled JSON is deleted. The info manifest
comes out byte for byte as before.

No zapgen emits Rust, so the crate never built; the frame codec is
written in zap.rs and pinned to frames Go wrote. The length prefix
is big-endian, as zap-proto/http's transport writes it.

examples/stream is a JSON op, an SSE op with a trailer and a byte
relay, tested over raw HTTP/1.1, h2c and ZAP sockets.

Claude-Session: https://claude.ai/code/session_01SCPMGSQsLNF2YtHFL4bwyp
2026-10-08 12:56:07 -07:00

67 lines
1.7 KiB
JSON

[
{
"Service": "count",
"Name": "create",
"OperationID": "post_count",
"Summary": "Count streams n ticks as server-sent events, then [DONE], and reports how many it sent in the x-sent trailer.",
"Description": "Count streams n ticks as server-sent events, then [DONE], and reports how\nmany it sent in the x-sent trailer.",
"Method": "POST",
"Path": "/v1/count",
"Args": [],
"Flags": [
{
"Name": "n",
"Field": "n",
"Type": "integer",
"Help": "N is how many ticks to send.",
"Required": true
},
{
"Name": "every-ms",
"Field": "everyMs",
"Type": "integer",
"Help": "EveryMs is the pause before each tick, in milliseconds.",
"Required": false
}
],
"Example": {
"n": 3,
"everyMs": 100
}
},
{
"Service": "echo",
"Name": "create",
"OperationID": "post_echo",
"Summary": "Echo answers the text it was sent.",
"Description": "Echo answers the text it was sent.",
"Method": "POST",
"Path": "/v1/echo",
"Args": [],
"Flags": [
{
"Name": "text",
"Field": "text",
"Type": "string",
"Help": "Text is the line.",
"Required": true
}
],
"Example": {
"text": "hi"
}
},
{
"Service": "relay",
"Name": "create",
"OperationID": "post_relay",
"Summary": "Relay answers the body it was sent, each chunk as it arrives, under the content type it was sent with.",
"Description": "Relay answers the body it was sent, each chunk as it arrives, under the\ncontent type it was sent with.",
"Method": "POST",
"Path": "/v1/relay",
"Args": [],
"Flags": null,
"Example": null
}
]