#quic #http-3 #websocket #data-stream #generic #native #web-transport-quinn

web-transport

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

12 releases (6 breaking)

0.10.0 Apr 6, 2024
0.6.2 Oct 27, 2024
0.6.0 Aug 19, 2024
0.3.1 Jul 25, 2024
0.0.1 Mar 30, 2024

#1608 in Network programming

Download history 155/week @ 2024-07-27 102/week @ 2024-08-03 300/week @ 2024-08-10 178/week @ 2024-08-17 64/week @ 2024-08-24 77/week @ 2024-08-31 27/week @ 2024-09-07 118/week @ 2024-09-14 79/week @ 2024-09-21 144/week @ 2024-09-28 72/week @ 2024-10-05 136/week @ 2024-10-12 106/week @ 2024-10-19 522/week @ 2024-10-26 98/week @ 2024-11-02 104/week @ 2024-11-09

850 downloads per month
Used in 13 crates (6 directly)

MIT/Apache

32KB
501 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

~0.4–11MB
~143K SLoC