{"id":13502864,"url":"https://github.com/gbaranski/ezsockets","last_synced_at":"2025-05-15T09:03:13.471Z","repository":{"id":41399200,"uuid":"464197735","full_name":"gbaranski/ezsockets","owner":"gbaranski","description":"High-level declarative API for building WebSocket Clients and Servers in Rust 🦀","archived":false,"fork":false,"pushed_at":"2025-02-04T09:06:55.000Z","size":362,"stargazers_count":252,"open_issues_count":16,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-15T09:02:18.264Z","etag":null,"topics":["async","hacktoberfest","rust","websocket","websocket-server","websockets"],"latest_commit_sha":null,"homepage":"https://docs.rs/ezsockets","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbaranski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-02-27T16:58:03.000Z","updated_at":"2025-05-05T17:15:59.000Z","dependencies_parsed_at":"2022-08-10T02:07:19.989Z","dependency_job_id":"e2869f8b-9bd1-4418-adf4-8f86f15c54aa","html_url":"https://github.com/gbaranski/ezsockets","commit_stats":{"total_commits":181,"total_committers":4,"mean_commits":45.25,"dds":0.04419889502762431,"last_synced_commit":"98c39cca73068c5d4b7b54e2bc6a9423d4801cb0"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaranski%2Fezsockets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaranski%2Fezsockets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaranski%2Fezsockets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbaranski%2Fezsockets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbaranski","download_url":"https://codeload.github.com/gbaranski/ezsockets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310513,"owners_count":22049468,"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","hacktoberfest","rust","websocket","websocket-server","websockets"],"created_at":"2024-07-31T22:02:27.601Z","updated_at":"2025-05-15T09:03:13.420Z","avatar_url":"https://github.com/gbaranski.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# ezsockets\n\nCreating a WebSocket server or a client in Rust can be troublesome. This crate facilitates this process by providing:\n\n- Traits to allow declarative and event-based programming.\n- Easy concurrency with Tokio and async/await. Server sessions are Clone'able and can be shared between tasks.\n- Heartbeat mechanism to keep the connection alive.\n- Automatic reconnection of WebSocket Clients.\n- Support for arbitrary client back-ends, with built-in native and WASM client connectors.\n- Support for multiple server back-ends such as Axum or Tungstenite.\n- TLS support for servers with `rustls` and `native-tls`.\n\n## Documentation\n\nView the full documentation at [docs.rs/ezsockets](http://docs.rs/ezsockets)\n\n## Examples\n- [`simple-client`](https://github.com/gbaranski/ezsockets/tree/master/examples/simple-client) - a simplest WebSocket client which uses stdin as input.\n- [`echo-server`](https://github.com/gbaranski/ezsockets/tree/master/examples/echo-server) - server that echoes back every message it receives.\n- [`echo-server`](https://github.com/gbaranski/ezsockets/tree/master/examples/echo-server-native-tls) - same as `echo-server`, but with `native-tls`.\n- [`counter-server`](https://github.com/gbaranski/ezsockets/tree/master/examples/counter-server) - server that increments global value every second and shares it with client\n- [`chat-client`](https://github.com/gbaranski/ezsockets/tree/master/examples/chat-client) - chat client for `chat-server` and `chat-server-axum` examples\n- [`wasm-client`](https://github.com/gbaranski/ezsockets/tree/master/examples/chat-client-wasm) - chat client for `chat-server` and `chat-server-axum` examples that runs in the browser (only listens to the chat)\n- [`chat-server`](https://github.com/gbaranski/ezsockets/tree/master/examples/chat-server) - chat server with support of rooms\n- [`chat-server-axum`](https://github.com/gbaranski/ezsockets/tree/master/examples/chat-server-axum) - same as above, but using `axum` as a back-end\n\n\n## Client\n\nBy default clients use [`tokio-tungstenite`](https://github.com/snapview/tokio-tungstenite) under the hood. Disable default features and enable `wasm_client` to run clients on WASM targets.\n\nSee [examples/simple-client](https://github.com/gbaranski/ezsockets/tree/master/examples/simple-client) for a simple usage\nand [docs.rs/ezsockets/server](https://docs.rs/ezsockets/latest/ezsockets/client/index.html) for documentation.\n\n## Server\n\nWebSocket server can use one of the supported back-ends:\n- [`tokio-tungstenite`](https://github.com/snapview/tokio-tungstenite) - the simplest way to get started.\n- [`axum`](https://github.com/tokio-rs/axum) - ergonomic and modular web framework built with Tokio, Tower, and Hyper\n- [`actix-web`](https://github.com/actix/actix-web) - Work in progress at [#22](https://github.com/gbaranski/ezsockets/issues/22)\n\nSee [examples/echo-server](https://github.com/gbaranski/ezsockets/tree/master/examples/echo-server) for a simple usage\nand [docs.rs/ezsockets/server](https://docs.rs/ezsockets/latest/ezsockets/server/index.html) for documentation.\n\n# License\n\nLicensed under [MIT](https://choosealicense.com/licenses/mit/).\n\n# Contact\n\nReach me out on Discord `gbaranski#5119`, or mail me at me@gbaranski.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbaranski%2Fezsockets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbaranski%2Fezsockets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbaranski%2Fezsockets/lists"}