10 releases

0.21.1 Jul 27, 2024
0.21.0 Mar 7, 2024
0.3.2 Jul 4, 2023
0.3.0 Jun 30, 2023
0.1.1 Nov 10, 2022

#1148 in Web programming

Download history 153/week @ 2024-07-23 118/week @ 2024-07-30 11/week @ 2024-08-20 21/week @ 2024-08-27 11/week @ 2024-09-10 6/week @ 2024-09-17 45/week @ 2024-09-24 9/week @ 2024-10-01

711 downloads per month

MIT license

550KB
381 lines

yew-webtransport

crates.io docs.rs

Summary

Access WebTransport in Yew apps using wasm-bindgen https://github.com/rustwasm/wasm-bindgen/pull/3344

YouTube Video: https://youtu.be/dztIToTf8Yc

thumbnail7

Justification

WebTransport is a new web standard that aims to provide a low-level API for secure, multiplexed communication between web browsers and servers. It has the potential to greatly improve the performance of web applications, especially those that require real-time communication or large data transfers. However, the current implementation of WebTransport in browsers is written in Javascript, which can make it difficult to use in Rust webapps.

Demo

you can find a demo in the examples folder which is a port of the https://webtransport.day/ website to Yew + Rust.

The website is live at https://security-union.github.io/yew-webtransport/

send datagram

If you want to run it locally, you have to set RUSTFLAGS

cd examples/webtransport-demo WS_URL=https://127.0.0.1:4433 RUSTFLAGS=--cfg=web_sys_unstable_apis trunk serve

Dependencies

~12–20MB
~278K SLoC