{"id":14155626,"url":"https://github.com/BiagioFesta/wtransport","last_synced_at":"2025-08-06T01:31:53.983Z","repository":{"id":169497104,"uuid":"639543842","full_name":"BiagioFesta/wtransport","owner":"BiagioFesta","description":"Async-friendly WebTransport implementation in Rust","archived":false,"fork":false,"pushed_at":"2024-04-13T20:54:14.000Z","size":457,"stargazers_count":309,"open_issues_count":16,"forks_count":17,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-04-14T10:59:46.129Z","etag":null,"topics":["async","client","http3","network","rust","server","webtransport"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BiagioFesta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-05-11T17:14:44.000Z","updated_at":"2024-04-17T09:43:57.007Z","dependencies_parsed_at":"2023-11-21T21:28:33.477Z","dependency_job_id":"24a6eeed-b31b-44eb-a2e4-57520ac8c3a5","html_url":"https://github.com/BiagioFesta/wtransport","commit_stats":null,"previous_names":["biagiofesta/wtransport"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiagioFesta%2Fwtransport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiagioFesta%2Fwtransport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiagioFesta%2Fwtransport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BiagioFesta%2Fwtransport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BiagioFesta","download_url":"https://codeload.github.com/BiagioFesta/wtransport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228815419,"owners_count":17976281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","client","http3","network","rust","server","webtransport"],"created_at":"2024-08-17T08:04:33.919Z","updated_at":"2025-08-06T01:31:53.964Z","avatar_url":"https://github.com/BiagioFesta.png","language":"Rust","funding_links":[],"categories":["server"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/BiagioFesta/wtransport/master/imgs/logo.svg\" alt=\"WTransport Logo\" /\u003e\n\u003c/p\u003e\n\n[![Documentation](https://docs.rs/wtransport/badge.svg)](https://docs.rs/wtransport/)\n[![Crates.io](https://img.shields.io/crates/v/wtransport.svg)](https://crates.io/crates/wtransport)\n[![CI](https://github.com/BiagioFesta/wtransport/actions/workflows/ci.yml/badge.svg)](https://github.com/BiagioFesta/wtransport/actions/workflows/ci.yml)\n[![Chat](https://img.shields.io/badge/chat-join-blue?logo=discord)](https://discord.gg/KPrrbWe5zg)\n\n# WTransport\n[WebTransport](https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/) protocol, pure-*rust*, *async*-friendly.\n\n## Introduction\n\nWebTransport is a new protocol being developed to enable *low-latency*, *bidirectional* communication between clients and servers over the web.\nIt aims to address the limitations of existing protocols like *HTTP* and *WebSocket* by offering a more *efficient* and *flexible* transport layer.\n\n### Benefits of WebTransport\n* 🚀 **Low latency**: WebTransport is designed to minimize latency, making it suitable for real-time applications such as gaming, video streaming, and collaborative editing.\n* 🔄 **Bidirectional communication**: WebTransport allows simultaneous data exchange between the client and server, enabling efficient back-and-forth communication without the need for multiple requests.\n* 🔀 **Multiplexing**: With WebTransport, multiple streams can be multiplexed over a single connection, reducing overhead and improving performance.\n* 🔒 **Security**: WebTransport benefits from the security features provided by the web platform, including transport encryption and same-origin policy.\n* 🌐 **Native Browser Support**: WebTransport is natively supported in modern web browsers, ensuring seamless integration and enhanced performance for web applications.\n\n \u003cp align=\"center\"\u003e\n   \u003ca href=\"https://docs.rs/wtransport/latest/wtransport/\"\u003eCheck Library Documentation\u003c/a\u003e\n \u003c/p\u003e\n\n### Notes\nPlease be aware that WebTransport is still a *draft* and not yet standardized.\nThe *WTransport* library, while functional, is not considered completely production-ready.\nIt should be used with caution and may undergo changes as the WebTransport specification evolves.\n\n## Simple API\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth\u003e Server \u003c/th\u003e\n\u003cth\u003e Client \u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```rust\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let config = ServerConfig::builder()\n        .with_bind_default(4433)\n        .with_identity(\u0026identity)\n        .build();\n\n    let connection = Endpoint::server(config)?\n        .accept()\n        .await     // Awaits connection\n        .await?    // Awaits session request\n        .accept()  // Accepts request\n        .await?;   // Awaits ready session\n\n    let stream = connection.accept_bi().await?;\n    // ...\n}\n```\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n```rust\n#[tokio::main]\nasync fn main() -\u003e Result\u003c()\u003e {\n    let config = ClientConfig::default();\n\n    let connection = Endpoint::client(config)?\n        .connect(\"https://[::1]:4433\")\n        .await?;\n\n    let stream = connection.open_bi().await?.await?;\n    // ...\n}\n```\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Browser Integration\nWebTransport [is supported](https://caniuse.com/mdn-api_webtransport) in modern browsers,\nenhancing the capabilities of web applications.\n\nFor instance, you can create a native *browser WebTransport* client connecting to a *Rust\nserver* using the following JavaScript code:\n\n```javascript\n// Create a WebTransport instance connecting to the Rust server\nlet transport = new WebTransport('https://[::1]:4433');\nawait transport.ready;\n\n// Create a bidirectional stream\nlet stream = await transport.createBidirectionalStream();\n\n// Send data from the client to the server\nawait stream.writable.getWriter().write(new TextEncoder().encode(\"hello\"));\n\n// Read data reply from the server\nlet data = await stream.readable.getReader().read();\nconsole.log(data);\n```\n\nCheck out the [W3C WebTransport API documentation](https://w3c.github.io/webtransport/) for more details and to\nexplore the full capabilities of WebTransport in the browser.\n\n## Getting Started\n### Clone the Repository\n```bash\ngit clone https://github.com/BiagioFesta/wtransport.git\n```\n```bash\ncd wtransport/\n```\n\n### Run `Full` Example\n\nThe [`examples/full.rs`](wtransport/examples/full.rs) is a minimal but complete server example that demonstrates the usage of WebTransport.\n\nYou can run this example using [*Cargo*](https://rustup.rs/), Rust's package manager, with the following command:\n```bash\ncargo run --example full\n```\n\nThis example initiates an *echo* WebTransport server that can receive messages. It also includes an integrated HTTP server.\n\nOpen [a supported web browser](https://caniuse.com/mdn-api_webtransport) and navigate to the page http://127.0.0.1:8080.\n\n## Examples\n* [Local Examples](https://github.com/BiagioFesta/wtransport/tree/master/wtransport/examples)\n\n## Other Languages\n\nWTransport has bindings for the following languages:\n\n- Elixir: [wtransport-elixir](https://github.com/bugnano/wtransport-elixir)\n- Node.js: [node-wtransport](https://github.com/krulod/node-wtransport)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBiagioFesta%2Fwtransport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBiagioFesta%2Fwtransport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBiagioFesta%2Fwtransport/lists"}