1 unstable release
0.1.8 | Dec 3, 2023 |
---|
#13 in #webtransport
Used in wtransport_lightyear_patcβ¦
170KB
4K
SLoC
WTransport
WebTransport protocol, pure-rust, async-friendly.
Introduction
WebTransport is a new protocol being developed to enable low-latency, bidirectional communication between clients and servers over the web. It aims to address the limitations of existing protocols like HTTP and WebSocket by offering a more efficient and flexible transport layer.
Benefits of WebTransport
- π Low latency: WebTransport is designed to minimize latency, making it suitable for real-time applications such as gaming, video streaming, and collaborative editing.
- π Bidirectional communication: WebTransport allows simultaneous data exchange between the client and server, enabling efficient back-and-forth communication without the need for multiple requests.
- π Multiplexing: With WebTransport, multiple streams can be multiplexed over a single connection, reducing overhead and improving performance.
- π Security: WebTransport benefits from the security features provided by the web platform, including transport encryption and same-origin policy.
Notes
Please be aware that WebTransport is still a draft and not yet standardized. The WTransport library, while functional, is not considered completely production-ready. It should be used with caution and may undergo changes as the WebTransport specification evolves.
Simple API
Server | Client |
---|---|
|
|
Getting Started
Clone the Repository
git clone https://github.com/BiagioFesta/wtransport.git
cd wtransport/
Run Full
Example
The examples/full.rs
is a minimal but complete server example that demonstrates the usage of WebTransport.
You can run this example using Cargo, Rust's package manager, with the following command:
cargo run --example full
This example initiates an echo WebTransport server that can receive messages. It also includes an integrated HTTP server and launches Google Chrome with the necessary options to establish connections using self-signed TLS certificates.
Examples
Other languages
WTransport has bindings for the following languages:
- Elixir: wtransport-elixir
Dependencies
~1.7β4MB
~89K SLoC