#quic #http-3 #websocket #data-stream #generic #native #platform

web-transport

Generic WebTransport API with native (web-transport-quinn) and WASM (web-transport-wasm) support

15 releases (8 breaking)

0.10.0 Apr 6, 2024
0.8.0 Jan 28, 2025
0.7.1 Jan 15, 2025
0.7.0 Dec 3, 2024
0.0.1 Mar 30, 2024

#1776 in Network programming

Download history 89/week @ 2024-10-16 475/week @ 2024-10-23 162/week @ 2024-10-30 125/week @ 2024-11-06 71/week @ 2024-11-13 108/week @ 2024-11-20 203/week @ 2024-11-27 304/week @ 2024-12-04 149/week @ 2024-12-11 54/week @ 2024-12-18 35/week @ 2024-12-25 30/week @ 2025-01-01 153/week @ 2025-01-08 357/week @ 2025-01-15 205/week @ 2025-01-22 222/week @ 2025-01-29

942 downloads per month
Used in 14 crates (6 directly)

MIT/Apache

38KB
660 lines

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?

I did make a generic trait. However, async traits are quite problematic and difficult to use. It shortly became impossible when trying to add WASM support because of !Send.

So this crate switches the implementation based on the underlying platform. As an added benefit, you no longer need to litter your code with generics.

Dependencies

~2–22MB
~407K SLoC