One session.
Calls both ways.
Pavia is a real-time RPC and messaging protocol between browsers or apps and servers. One persistent session carries typed calls in both directions, and the server can reach any session, user or group.
Rust server · generated TypeScript client · Apache 2.0 or MIT
The code is illustrative.
CALLS
Four shapes, on one multiplexed session.
Every call has cancellation, deadlines, metadata and structured errors. Either side can be the caller.
Unary
One request, one result. The everyday call.
Server stream
One request, a stream of items back. Feeds, logs, progress.
Client stream
Many items up, one result. Uploads, batched writes.
Bidirectional
Both sides stream at once, with flow control on every binding.
TRANSPORTS
WebTransport first. WebSocket everywhere else.
The client races both bindings and keeps the one that connects. Your code sees one logical protocol, and a session survives a dropped transport through resumption.
BUILT IN
The parts you usually build yourself.
Targeting
Call or notify one session, every session of a user, or a whole group.
Channels with history
Durable history and gapless recovery after a reconnect.
Presence
Know who is in a channel, with joins and leaves as events.
Datagrams
Lossy, latest-value data such as cursors and telemetry.
Typed contracts
A machine-readable manifest that client generators consume, with a compatibility checker.
Encode once, fan out
Binary CBOR frames let routers read envelopes without decoding payloads.
SPEC FIRST
The spec is the reference implementation.
Behavior is written into the specification and its test vectors before it reaches code. A public conformance suite lets any implementation prove what it supports.
Read the specificationConformance levels
- Core
- Streaming
- Server calls
- Auth lifecycle
- Lanes
- Datagrams
- Resumption
- Channels
- History
- Presence
ROADMAP
Built in the open, one milestone at a time.
M0 to M7
The WebSocket binding, typed unary and streaming calls in both directions, the generated TypeScript client, targeting and the axum integration.
Headline 0.x
The WebTransport binding, transport racing with automatic fallback, datagrams and notification lanes.
Feature complete
Session resumption, the authentication lifecycle, channels with history, presence, the Rust client and TypeScript extras, and multi-node deployments.
1.0
Production hardening, ergonomics, the specification frozen as 1.0 and the public conformance suite.