web-transport

Crates.ioweb-transport
lib.rsweb-transport
version0.9.6
created_at2024-03-30 12:57:09.102266+00
updated_at2025-09-04 22:07:33.439442+00
descriptionGeneric WebTransport API with native (web-transport-quinn) and WASM (web-transport-wasm) support.
homepage
repositoryhttps://github.com/kixelated/web-transport
max_upload_size
id1191046
size72,011
(kixelated)

documentation

README

crates.io docs.rs discord

web-transport

WebTransport is a new browser API powered by QUIC intended as a replacement for WebSockets. Most importantly, QUIC supports multiple independent data streams.

This crate provides a generic WebTransport implementation depending on the platform:

Why no trait?

See web-transport-trait.

The biggest problem with async traits in Rust is Send. WASM is !Send and as far as I can tell, it's not possible to implement a trait that both can support. web-transport-trait requires Send which rules out WASM.

This crate skirts the issue by switching the underlying implementation based on the platform. The compiler can then automatically apply Send bounds instead of explicitly requiring them. Unfortunate, I know.

Commit count: 175

cargo fmt