| Crates.io | web-transport-ws |
| lib.rs | web-transport-ws |
| version | 0.2.3 |
| created_at | 2025-09-03 19:18:37.848607+00 |
| updated_at | 2026-01-24 00:09:36.501884+00 |
| description | WebTransport polyfill using WebSockets |
| homepage | |
| repository | https://github.com/moq-dev/web-transport |
| max_upload_size | |
| id | 1823071 |
| size | 123,196 |
A WebTransport polyfill that uses WebSocket as the underlying transport, with implementations in both Rust and TypeScript/JavaScript.
Both implementations use the same QUIC-like frame encoding over WebSocket:
This is a simplified version of QMux, which might be used in the future.
Check if WebTransport is available, otherwise install the polyfill:
import { install } from "@moq/web-transport-ws"
// Install the polyfill if needed.
install();
// Now WebTransport is available even in Safari
const transport = new WebTransport("https://example.com/path")
URLs are automatically rewritten with the WebSocket protocol:
https://example.com/path → wss://example.com/pathcargo build
npm install
npm run build
cargo run --example server
bun examples/client.ts
deno -A --sloppy-imports examples/client.ts
bun build --target=node --outfile=examples/client.js examples/client.ts
node examples/client.js
MIT OR Apache-2.0