Crates.io | web-transport |
lib.rs | web-transport |
version | 0.6.2 |
source | src |
created_at | 2024-03-30 12:57:09.102266 |
updated_at | 2024-10-27 19:03:33.648194 |
description | Generic WebTransport API with native (web-transport-quinn) and WASM (web-transport-wasm) support. |
homepage | |
repository | https://github.com/kixelated/web-transport-rs |
max_upload_size | |
id | 1191046 |
size | 14,653 |
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:
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.