{"id":43326462,"url":"https://github.com/bugnano/wtransport-elixir","last_synced_at":"2026-02-01T23:12:24.831Z","repository":{"id":180438930,"uuid":"665145096","full_name":"bugnano/wtransport-elixir","owner":"bugnano","description":"Elixir bindings for the WTransport WebTransport library","archived":false,"fork":false,"pushed_at":"2025-12-27T09:38:06.000Z","size":118,"stargazers_count":22,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-29T01:09:51.261Z","etag":null,"topics":["http3","quic","webtransport"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugnano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-11T14:30:41.000Z","updated_at":"2025-12-27T09:38:09.000Z","dependencies_parsed_at":"2024-03-30T17:22:32.324Z","dependency_job_id":"c560ecb4-26b5-463f-9c49-053fce813646","html_url":"https://github.com/bugnano/wtransport-elixir","commit_stats":null,"previous_names":["bugnano/wtransport-elixir"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bugnano/wtransport-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugnano%2Fwtransport-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugnano%2Fwtransport-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugnano%2Fwtransport-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugnano%2Fwtransport-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugnano","download_url":"https://codeload.github.com/bugnano/wtransport-elixir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugnano%2Fwtransport-elixir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T23:10:54.274Z","status":"ssl_error","status_checked_at":"2026-02-01T23:10:47.298Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["http3","quic","webtransport"],"created_at":"2026-02-01T23:12:24.285Z","updated_at":"2026-02-01T23:12:24.826Z","avatar_url":"https://github.com/bugnano.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wtransport\n\nElixir bindings for the [WTransport](https://github.com/BiagioFesta/wtransport) WebTransport library.\n\n## About WebTransport\n\nWebTransport is a web API that uses the HTTP/3 protocol as a bidirectional transport.\nIt's intended for two-way communications between a web client and an HTTP/3 server.\nIt supports sending data both unreliably via its datagram APIs, and reliably via its streams APIs.\n\n## About WTransport\n\n[WTransport](https://github.com/BiagioFesta/wtransport) is a pure-rust implementation of the WebTransport protocol.\n\nThe Wtransport Elixir bindings implement the server part of WTransport with an API heavily inspired by\n[Thousand Island](https://github.com/mtrudel/thousand_island).\n\n## Prerequisites\n\n- Erlang/OTP (version 24 or greater)\n- Elixir (version 1.12 or greater)\n- The Rust compiler + Cargo (WTransport is written in Rust)\n\nYou'll also need TLS certificate files, even for local development, as HTTP/3 mandates the use of TLS.\n\nA tool like [mkcert](https://github.com/FiloSottile/mkcert) can be handy for generating certificate files suitable for local development.\n\n## Installation\n\nThe package can be installed by adding `wtransport` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:wtransport, git: \"https://github.com/bugnano/wtransport-elixir.git\"}\n  ]\nend\n```\n\n## Usage\n\nWtransport is implemented as a supervision tree which is intended to be hosted inside a host application.\n\nExample:\n\n```elixir\ndef start(_type, _args) do\n  wtransport_options = [\n    host: \"localhost\",\n    port: 4433,\n    certfile: \"cert.pem\",\n    keyfile: \"key.pem\",\n    connection_handler: MyApp.ConnectionHandler,\n    stream_handler: MyApp.StreamHandler\n  ]\n\n  children = [\n    {Wtransport.Supervisor, wtransport_options}\n  ]\n\n  opts = [strategy: :one_for_one, name: MyApp.Supervisor]\n  Supervisor.start_link(children, opts)\nend\n```\n\nAside from supervising the WTransport process tree,\napplications interact with WTransport primarily via the\n`Wtransport.ConnectionHandler` and `Wtransport.StreamHandler` behaviours.\n\nNote that you have to pass the name of the modules of your application that implement the\n`Wtransport.ConnectionHandler` and `Wtransport.StreamHandler` behaviours, as options\nto the `Wtransport.Supervisor`.\n\n### ConnectionHandler\n\nThe `Wtransport.ConnectionHandler` behaviour defines the interface that Wtransport uses to pass `Wtransport.Connection`s up to the application level;\nit is used to handle:\n\n- Session requests (via the `handle_session` callback)\n- Connection requests (via the `handle_connection` callback)\n- Unreliable, unordered datagrams (via the `handle_datagram` callback)\n\nA simple implementation for a `Wtransport.ConnectionHandler` would look like this:\n\n```elixir\ndefmodule MyApp.ConnectionHandler do\n  use Wtransport.ConnectionHandler\n\n  @impl Wtransport.ConnectionHandler\n  def handle_datagram(dgram, %Wtransport.Connection{} = connection, state) do\n    :ok = Wtransport.Connection.send_datagram(connection, dgram)\n\n    {:continue, state}\n  end\nend\n```\n\n### StreamHandler\n\nThe `Wtransport.StreamHandler` behaviour defines the interface that Wtransport uses to pass `Wtransport.Stream`s up to the application level;\nit is used to handle:\n\n- Stream requests (via the `handle_stream` callback)\n- Reliable, ordered data (via the `handle_data` callback)\n\nA simple implementation for a `Wtransport.StreamHandler` would look like this:\n\n```elixir\ndefmodule MyApp.StreamHandler do\n  use Wtransport.StreamHandler\n\n  @impl Wtransport.StreamHandler\n  def handle_data(data, %Wtransport.Stream{} = stream, state) do\n    if stream.stream_type == :bi do\n      :ok = Wtransport.Stream.send(stream, data)\n    end\n\n    {:continue, state}\n  end\nend\n```\n\n## Example application\n\nWtransport comes with a simple echo server to serve as an example;\nit can be found in the `examples/wtransport_echo` folder of this project.\nBefore starting it, change the `runtime.exs` file to point to the correct\ncertificate paths, and run it with:\n\n```bash\nmix run --no-halt\n```\n\nAfter the server has been started, you can test it by pointing your browser to\nhttps://webtransport.day/\nand connect to the URL `https://localhost:4433`\n(or `https://[::1]:4433` if the server is listening on IPv6 only).\n\n## License\n\nEverything in this repository except for the files in the `examples/wtransport_echo` directory and its subdirectories,\nis licensed under the MPL-2.0\n\nThe files under the `examples/wtransport_echo` directory and its subdirectories,\nare licensed under the Unlicense\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugnano%2Fwtransport-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugnano%2Fwtransport-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugnano%2Fwtransport-elixir/lists"}