Four nouns
wireframe keeps each layer’s vocabulary separate, so transport concerns do not leak into routing and routing does not leak into the domain.
- Frame
- The transport unit a
FrameCodeccuts from the byte stream and writes back to it. It knows its own length and, perhaps, a correlation ID; it does not know what its payload means. - Fragment
- A bounded slice of an oversized payload, with a header saying which message it belongs to and where it falls. Optional, and invisible above the transport.
- Envelope
- The routable wrapper decoded from a frame’s payload: a message ID, an optional correlation ID, and the payload bytes.
Packetis the trait;Envelopeis the bundled type. - Message
- The typed value inside an envelope’s payload, encoded by the serializer. Bincode by default.
Inbound
- Accept. A worker accepts a TCP connection. The application was prepared once, before the server reported readiness, and every connection shares it.
- Preamble. If one is configured, the server reads it first, up to 1 KiB under a 10-second deadline by default. Bytes read past it are replayed. Without one, nothing is read, and the connection goes straight to the application, which may speak first.
- Decode frames. The codec cuts frames from the stream.
- Deserialize. The serializer decodes an envelope, which must fill the frame exactly. A metadata-aware serializer can read routing fields first, but the framework still deserializes fully unless
should_deserialize_after_parsereturns false. - Reassemble. With fragmentation on, fragments carried in envelopes are rejoined into whole messages.
- Assemble. With a message assembler installed, protocol-level multi-frame messages are joined for ordinary routes. A streaming route can start receiving chunks before assembly is complete.
- Route. The message ID selects one route. No route: the message is logged and dropped.
- Middleware and handler. The buffered route’s middleware stack runs, outermost first, around the handler. Streaming routes call their handlers directly.
Outbound
A route reply goes back out through the middleware and is rebuilt as an envelope with the request’s message ID and correlation ID. A route_response handler returns a Response, which may be one frame, several, a stream, or nothing; each frame takes the request’s correlation ID. A streaming_route can return a payload to send under the request’s IDs. The connection’s actor writes each frame: fragmented if it is too large and fragmentation is on, then serialized, wrapped by the codec, passed to before_send, and encoded. The order is fixed, so each fragment is its own frame. A stream’s terminator skips fragmentation and serialization but still meets before_send, and so do pushes, which are written between replies and between the frames of a streamed one.
Where state lives
| Scope | Mechanism |
|---|---|
| Application-wide | Values captured by handler and middleware closures, typically an Arc |
| Per connection | The value returned by on_connection_setup, handed to on_connection_teardown |
| Per middleware layer | Fields of the Transform, such as the counter in the middleware guide |
| Across connections | SessionRegistry, holding weak push handles by connection ID. Server connections add themselves before on_connection_setup runs and leave when their task ends; share one with with_session_registry |
What this release does not do
A frank list, because every one of these appears somewhere in the upstream design documents. The README lists what to know before building on this release:
- A
routehandler observes and does not reply; middleware answers for it. Aroute_responsehandler returns its reply. middleware::from_fncannot be passed toWireframeApp::wrap.- A connection serves one request at a time. A live request body or a long streamed reply delays the next dispatch. Pushes can slip between reply frames.
ConnectionContextcannot hold your own data.- Idle connections stay open while the server runs. Shutdown closes them. Running tasks can still delay the drain.
- There is no built-in TLS.
The roadmap says what is in progress.

