WebTransport is a new web API that allows for low-level, bidirectional communication between a client and a server. It's available in the browser as an alternative to HTTP and WebSockets.
WebTransport is layered on top of HTTP/3 which is then layered on top of QUIC. This library hides that detail and tries to expose only the QUIC API, delegating as much as possible to the underlying QUIC implementation.
QUIC provides two primary APIs:
QUIC streams are ordered, reliable, flow-controlled, and optionally bidirectional. Both endpoints can create and close streams (including an error code) with no overhead. You can think of them as TCP connections, but shared over a single QUIC connection.
QUIC datagrams are unordered, unreliable, and not flow-controlled. Both endpoints can send datagrams below the MTU size (~1.2kb minimum) and they might arrive out of order or not at all. They are basically UDP packets, except they are encrypted and congestion controlled.
For package and backend choices, including a comparison with wtransport, see the selection guide.
The Rust workspace contains these crates under rs/:
- web-transport provides a platform-selected API backed by Quinn or the browser WebTransport API.
- web-transport-trait defines async and poll-based interfaces for sessions and streams on native and WASM targets.
- web-transport-proto implements the HTTP/3 setup for WebTransport and shared protocol primitives.
- web-transport-quinn wraps Quinn with WebTransport session setup.
- web-transport-noq wraps Noq, a Quinn fork, with WebTransport session setup.
- web-transport-quiche wraps Quiche through tokio-quiche with WebTransport session setup.
- web-transport-iroh runs WebTransport over iroh connections.
- web-transport-wasm wraps the browser WebTransport API.
- qmux implements QMux over TCP, TLS, Unix domain sockets, and WebSockets, including the legacy WebTransport-over-WebSocket wire format.
- web-transport-node exposes the Quinn backend through NAPI-RS for the Node.js package.
- web-transport-ffi exposes the Quinn backend through UniFFI for Python, Kotlin, and Swift.
- @moq/qmux implements QMux over WebSockets.
- @moq/web-socket-stream provides a WebSocketStream ponyfill and polyfill.
- @moq/web-transport provides a Node.js WebTransport client and server through the native Node bridge.
- web-demo is the browser demo.
Built from rs/web-transport-ffi via UniFFI; all three release workflows fire from a single web-transport-ffi-v* tag.
| Language | Package | Source |
|---|---|---|
| Python | web-transport-rs (PyPI) |
py/web-transport |
| Kotlin | dev.moq:web-transport (Maven Central) |
kt/ |
| Swift | WebTransportFFI.xcframework.zip (attached to GitHub Releases) |
swift/ |
Each binding's runtime job runs on every PR to main with no path filter, so any Rust, FFI, build script, or workspace change exercises every package. The release workflows also run as path-filtered PR smoke builds covering rs/web-transport-ffi, the workspace crates it depends on, Cargo.toml, Cargo.lock, and their own sources. Mobile emulators are out of scope; Android and iOS are only cross-compiled by those smoke builds.
| Package | PR job | Host | Local command |
|---|---|---|---|
| Python | test-py.yml |
Linux | nix develop --command ./py/web-transport/test-wheel.sh |
| Node | node.yml |
Linux | nix develop --command bun run --cwd js/web-transport test:runtime |
| Kotlin/JVM | kotlin in pr.yml |
Linux | nix develop --command just test-kotlin |
| Swift | test-swift.yml |
macOS | just test-swift |
Development plans live in quest/. Enter nix develop to
use the pinned Quest CLI, then run quest guide for the workflow. Without
entering the shell, use nix run .#quest -- guide.
Restart your agent session after setup to load the quest skills. Use
$quest-plan in Codex or /quest-plan in Claude Code to plan work, and
$quest-import or /quest-import to bring in GitHub issues. quest check
validates the tree and runs as part of just check and CI.