{"id":13504105,"url":"https://github.com/websockets-rs/rust-websocket","last_synced_at":"2025-05-14T00:05:27.605Z","repository":{"id":23835514,"uuid":"27212799","full_name":"websockets-rs/rust-websocket","owner":"websockets-rs","description":"A WebSocket (RFC6455) library written in Rust","archived":false,"fork":false,"pushed_at":"2023-09-17T12:52:17.000Z","size":22471,"stargazers_count":1580,"open_issues_count":45,"forks_count":226,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-05-13T03:06:57.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://websockets-rs.github.io/rust-websocket/","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/websockets-rs.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":"ROADMAP.md","authors":null,"dei":null}},"created_at":"2014-11-27T06:49:59.000Z","updated_at":"2025-05-12T15:59:24.000Z","dependencies_parsed_at":"2024-01-30T04:03:18.633Z","dependency_job_id":null,"html_url":"https://github.com/websockets-rs/rust-websocket","commit_stats":{"total_commits":486,"total_committers":66,"mean_commits":7.363636363636363,"dds":0.6728395061728395,"last_synced_commit":"74c82be3de282e1c4c35c51daac1a84b583ce8ea"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets-rs%2Frust-websocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets-rs%2Frust-websocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets-rs%2Frust-websocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/websockets-rs%2Frust-websocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/websockets-rs","download_url":"https://codeload.github.com/websockets-rs/rust-websocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254043363,"owners_count":22004936,"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":[],"created_at":"2024-07-31T23:00:54.234Z","updated_at":"2025-05-14T00:05:27.587Z","avatar_url":"https://github.com/websockets-rs.png","language":"Rust","readme":"Rust-WebSocket [![Build Status](https://travis-ci.com/websockets-rs/rust-websocket.svg?branch=master)](https://travis-ci.com/websockets-rs/rust-websocket) [![docs.rs](https://docs.rs/websocket/badge.svg)](https://docs.rs/websocket)\n==============\n\n\n|**Note: Maintainership of this project is slugglish. You may want to use [tungstenite](https://crates.io/crates/tungstenite) or [tokio-tungstenite](https://crates.io/crates/tokio-tungstenite) instead.**|\n|----|\n\n\nRust-WebSocket is a WebSocket ([RFC6455](https://datatracker.ietf.org/doc/rfc6455/)) library written in Rust.\n\n**Note that this particular library is based on obsolete dependencies (Hyper 0.10, Tokio 0.1), so is a poor choice for new projects. You are adviced to use other Websocket libraries.**\n\nRust-WebSocket provides a framework for dealing with WebSocket connections (both clients and servers). The library is currently in an experimental state, but provides functionality for both normal and secure WebSockets, a message level API supporting fragmentation, a data frame level API, and the ability to extend and customize behaviour.\n\n## Installation\n\nTo add a library release version from [crates.io](https://crates.io/crates/websocket) to a Cargo project, add this to the 'dependencies' section of your Cargo.toml:\n\n```INI\nwebsocket = \"0.24.0\"\n```\n\nTo add the library's Git repository to a Cargo project, add this to your Cargo.toml:\n\n```INI\n[dependencies.websocket]\n\ngit = \"https://github.com/websockets-rs/rust-websocket.git\"\n```\n\nOptionally add ```extern crate websocket;``` to your project.\n\nNote that `0.24.0` is the last version of `rust-websocket` that supports some very old Rust versions (I'm not sure which exactly, maybe 1.28).\n\n## Usage\n\nThe library can be compiled with tests and benches and some extra capabilities on Rust nightly. To enable the nightly features, use `cargo --features nightly ...`.\n\nSee the documentation for the latest release of the library [here](https://docs.rs/websocket/), and also the examples, which are located in `/examples` and can be run with:\n\n```\ncargo run --example server\n```\n\nAnd in a separate terminal:\n\n```\ncargo run --example client\n```\n\n## Testing\n\nThe library can be tested using `cargo test` to run tests and `cargo bench` to run bench tests.\n\nA number of tests are included, which ensure core WebSocket functionality works as expected. These tests are not yet comprehensive, and are still being worked on.\n\n## Autobahn TestSuite\n\nRust-WebSocket uses the [Autobahn TestSuite](https://crossbar.io/autobahn/) to test conformance to RFC6455. If you have Autobahn TestSuite installed you can run these tests yourself using the commands:\n\n```\nwstest -m fuzzingserver\ncargo run --example autobahn-client\n```\n\nTo test the client implementation, and\n\n```\nwstest -m fuzzingclient\ncargo run --example autobahn-server\n```\n\nTo test the server implementation. The spec files are available [here](http://websockets-rs.github.io/rust-websocket/autobahn).\n\nThe results of these tests are available [here](http://websockets-rs.github.io/rust-websocket/autobahn).\n\n## Contributing\n\nBefore you make a PR be sure to run all the tests!\n\n```bash\n# install\nrustup component add rustfmt-preview\nrustup component add clippy-preview\n\n# test\ncargo +nightly fmt -- --check\ncargo +nightly clippy --all-features -- -D clippy::all\ncargo test --features nightly\ncargo bench --features nightly\n./scripts/build-all.sh\n```\n\n## License\n\n### The MIT License (MIT)\n\nCopyright (c) 2014-2015 Cyderize\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":["Libraries","库 Libraries","Rust"],"sub_categories":["Web programming","网络编程 Web programming"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsockets-rs%2Frust-websocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebsockets-rs%2Frust-websocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebsockets-rs%2Frust-websocket/lists"}