Streaming
#[rpc_stream] is a new procedure type alongside queries and mutations that enables HTTP
streaming responses. It's built on top of Axum's streaming primitives and Vercel's streaming support.
Coming Soon
How it works
The handler receives typed input (deserialized as usual) plus a StreamSender for emitting chunks. The generated TypeScript client gets a stream() method returning an AsyncIterable.
Supported formats
- Raw chunked (
text/plain) — general purpose - SSE (
text/event-stream) — real-time events, LLM token streaming - JSON Lines (
application/x-ndjson) — structured streaming data