#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

#1656 in Network programming

Download history 74/week @ 2024-08-05 332/week @ 2024-08-12 149/week @ 2024-08-19 92/week @ 2024-08-26 40/week @ 2024-09-02 24/week @ 2024-09-09 130/week @ 2024-09-16 74/week @ 2024-09-23 145/week @ 2024-09-30 69/week @ 2024-10-07 136/week @ 2024-10-14 307/week @ 2024-10-21 342/week @ 2024-10-28 84/week @ 2024-11-04 117/week @ 2024-11-11 108/week @ 2024-11-18

853 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
~142K SLoC