Skip to content
wireframe home
Menu

This alpha, what changed, and what is next

0.4.0-alpha1 is an alpha that is not yet published: expect interfaces to change before 1.0, and pin the version. Beyond it, the upstream roadmap is a plan, and the proposals are proposals.

wireframe 0.4.0-alpha1 · samples verified 2026-12-02

Seven hexagonal nodes, each labelled with an RFC number, are linked to a central node labelled PR 845.
Plate 06 · Concept artwork Seven proposals. Seven requests for comments gathered around one shared core. Proposed · RFCs 0003 to 0009. None has a runtime in 0.4.0-alpha1.

Not yet published · targeted for 2 December 2026

In 0.4.0-alpha1

  • Routing by message ID, the bundled Envelope and custom Packet types, and correlation IDs.
  • Pluggable framing through FrameCodec, with length-delimited framing by default; preambles with a deadline.
  • Transform middleware, connection setup and teardown hooks, and every WireframeProtocol hook, from on_connection_setup to on_eof.
  • Streamed and multi-packet replies through route_response, and server pushes through per-connection push queues and a SessionRegistry.
  • Codec recovery policies, consulted on every decoder failure.
  • Transport fragmentation, protocol message assembly, and three-tier memory budgets.
  • A client with correlated calls, streamed replies, streaming sends, hooks, tracing, and pools.
  • The testkit feature and the wireframe_testing crate.

A connection dispatches one request at a time. A live request body or a streamed reply occupies the dispatch slot, and pushes can slip between reply frames.

Since 0.3.0

What to act on

The migration guide lists every change. The ones most likely to surprise are those that still compile.

  • A prepared application. WireframeServer::new calls its factory once per server run and shares the prepared application across connections. Per-connection state moves to on_connection_setup; WireframeServer::from_app takes an application already built, and spawn returns a ServerShutdown.
  • Preamble deadlines. The preamble read has a 10-second default deadline, a preamble that encodes to no bytes reads nothing at all, and an error from the success handler now closes the connection.
  • Bounded, exact decoding. The bundled bincode decoders cap peer-declared lengths at 16 MiB for messages and 1 KiB for preambles, and trailing bytes after an envelope are a decoding error.
  • Binding totals and counted fragments. A declared total_body_len is a commitment, and fragment bytes count towards memory budgets.
  • Every hook runs. before_send runs once on every outbound frame, including each fragment, and on_command_end, handle_error, and on_eof now fire too. Look for code that stood in for them.
  • Hook values. ProtocolHooks is an enum; a struct literal becomes CustomProtocolHooks { .. }.into(). ConnectionContext is #[non_exhaustive], and the protocol error parameter defaults to NoProtocolError rather than ().
  • Extractors and app_data removed. ADR 0017 removes APIs no dispatch path ever called; capture shared state in the handler’s closure, as an Arc.
  • Shutdown and teardown. stop() closes idle connections. The listener closes when the last accept loop exits, and tracked tasks can still delay the drain. Teardown runs once after errors and handler panics, but not if the connection future is dropped or aborted.
  • Sessions and pushes. SessionRegistry::insert returns whether it published and refuses to replace a live entry, and try_push now obeys the rate limit.
  • Metrics. wireframe_connections_active counts a connection from accept until its task ends, and an oversized frame’s codec error is now framing, not io.
  • Pool limits. At most max_waiters acquisitions may queue, closed pools say so, and interrupted work discards its socket.
  • Reassembly caps. FragmentationConfig gains max_concurrent_partials and max_buffered_bytes, and Reassembler::new takes both.
  • Error enums. ClientError is now #[non_exhaustive], and it, ServerError, PushError, MessageAssemblyError, and ReassemblyError gain variants.
  • No linger. SocketOptions::linger and the builder’s linger are gone; close().await is the graceful path.
  • Deprecations. WireframeApp::handle_connection and handle_connection_result rebuild the middleware chains for every connection. Prepare the application once and use PreparedApp. with_push_dlq is deprecated too; give the queue template a dlq sender.
  • Dependencies. metrics-exporter-prometheus and tracing-subscriber are no longer brought along at run time. Declare them if the application uses them.

In 0.4.0-alpha1 · new since 0.3.0

The connection, wired

Every server connection now runs its own connection actor, so the parts 0.3.0 shipped as building blocks reach the wire. The upstream roadmap’s phase 20, prepared applications and runtime ownership, is complete.

  • Streamed replies. WireframeApp::route_response takes a ResponseHandler that returns a Response: one frame, several, none, a stream, or a multi-packet channel, closed by the frame stream_end_frame returns.
  • Streamed requests. Register a streaming_route to handle a request body in chunks.
  • Server pushes. with_push_queues gives each connection its own queues, on_connection_setup receives its PushHandle, and with_session_registry lets any task find it. A frame a policy drops is counted by wireframe_push_drops_total.
  • Every protocol hook runs. before_send on each outbound frame, on_command_end after each completed reply, handle_error on a streamed reply’s protocol error, and on_eof, with the bytes that arrived, when a peer vanishes mid-frame.
  • Recovery policies. A RecoveryPolicyHook is consulted on decoder failures, and each failure is counted by wireframe_codec_errors_total. With no hook installed, a failure still closes the connection.

Limits of this release

Before you build on it

Four things to plan around. The README lists them, and the users’ guide says how far each goes.

  • Request streaming is opt-in. Ordinary routes receive buffered messages. Streaming routes bypass middleware.
  • One request at a time. Other requests wait behind a live body or a streamed reply. Pushes can slip between reply frames.
  • Idle peers stay connected. read_timeout_ms is a housekeeping interval, not an idle timeout, so bound quiet peers in the protocol. Shutdown closes idle connections. Tracked tasks can still delay the drain.
  • No built-in TLS. Terminate it in front of the server.

Proposed · none implemented in 0.4.0-alpha1

Seven proposals

Seven requests for comments describe where the runtime could go next. Their documents have merged; their runtime has not, and the roadmap calls them “proposed work, not shipped guarantees”. Each link is the proposal as it stands in 0.4.0-alpha1.

A peer sends to a reader inside one session, which passes to bounded work, then to bounded queues, then to a sole writer that sends back to the peer. Cancellation and deadlines sit beside them. Beneath: reads advance while writes wait.
Plate 33 · Technical diagram Duplex session driver. One session owns its reader, its only writer, and bounded work, so reading carries on while a write or a handler waits. Proposed · RFC 0004. None of it has a runtime in 0.4.0-alpha1.
Phase transition. A red flush barrier divides an old phase from a new one across three lanes: encoded frames are flushed first; accepted work that was not encoded is cancelled and may be retried; unread bytes are handed over once.
Plate 10 · Technical diagram Flush barrier. Before a protocol changes phase, everything already encoded is written out, anything accepted but not yet encoded is cancelled, and unread bytes pass to the new phase exactly once. Proposed · RFC 0005. None of it has a runtime in 0.4.0-alpha1.
A box labelled TCP stream holds one continuous line. Below, a box of datagram events holds datagram 1, marked one unit, once; datagram 2; a second datagram 2, marked duplicate: own event; and a shorter datagram 3, marked truncated: marked.
Plate 11 · Technical diagram Streams and datagrams. A stream hides loss, duplication, and truncation. A datagram transport would report each packet once, as one unit, duplicates and truncation included. Proposed · RFC 0009. wireframe serves TCP streams today.
A scripted raw peer, with short reads, byte-boundary faults, and controlled time, connects through a golden-bytes check to a toy adapter handling setup, frames, and cancellation. Beneath: a verified toy, not certification.
Plate 21 · Technical diagram Conformance harness. Scripted peers drive a toy adapter, byte by byte, against golden bytes with their own provenance. Proposed · RFC 0008. A verified toy for each protocol, explicitly not a certification.

The first consumers proposed for these contracts are mxd serving Hotline, Modbus TCP, and a toy for the Agent Client Protocol. The toy is a prospective consumer test of bounded framing and duplex progress; it is not shipped, and the protocol’s own semantics stay outside wireframe.

Planned · upstream roadmap

Toward 1.0

  • Zero-copy payloads through the public byte APIs. This is not in the alpha: Serializer::serialize still returns Vec<u8>.
  • Alternative transports beyond raw TCP, a formal message versioning system, and built-in middleware or guides for TLS.
  • Formal verification of message assembly and dispatch: bounded model checks with Kani, model checks with Stateright, and proofs with Verus.

Track the detail in the upstream roadmap and the changelog.