{"id":13440285,"url":"https://github.com/snapview/tungstenite-rs","last_synced_at":"2025-11-12T21:27:13.168Z","repository":{"id":38375014,"uuid":"85327864","full_name":"snapview/tungstenite-rs","owner":"snapview","description":"Lightweight stream-based WebSocket implementation for Rust.","archived":false,"fork":false,"pushed_at":"2025-09-24T12:36:09.000Z","size":740,"stargazers_count":2222,"open_issues_count":35,"forks_count":253,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-10-29T21:48:34.683Z","etag":null,"topics":["rust","websockets"],"latest_commit_sha":null,"homepage":null,"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/snapview.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-03-17T15:38:17.000Z","updated_at":"2025-10-29T09:23:33.000Z","dependencies_parsed_at":"2023-02-09T22:45:41.973Z","dependency_job_id":"98cb7c12-fe8a-4e76-bdbe-d710bcfb0310","html_url":"https://github.com/snapview/tungstenite-rs","commit_stats":{"total_commits":457,"total_committers":80,"mean_commits":5.7125,"dds":0.7614879649890591,"last_synced_commit":"fb9c15417813f0c2f3209e22eece309544895d79"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/snapview/tungstenite-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapview%2Ftungstenite-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapview%2Ftungstenite-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapview%2Ftungstenite-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapview%2Ftungstenite-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snapview","download_url":"https://codeload.github.com/snapview/tungstenite-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snapview%2Ftungstenite-rs/sbom","scorecard":{"id":112927,"data":{"date":"2025-08-04","repo":{"name":"github.com/snapview/tungstenite-rs","commit":"7c4ad5bae6b80be1272d3b5f0837fb64e2f10702"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":6.2,"checks":[{"name":"Code-Review","score":7,"reason":"Found 16/22 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"9 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:99: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/snapview/tungstenite-rs/ci.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found","Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/parse_frame_header.rs:2","Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/read_message_client.rs:2","Info: RustCargoFuzzer integration found: fuzz/fuzz_targets/read_message_server.rs:2"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T15:34:03.993Z","repository_id":38375014,"created_at":"2025-08-15T15:34:03.993Z","updated_at":"2025-08-15T15:34:03.993Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284115822,"owners_count":26949956,"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","status":"online","status_checked_at":"2025-11-12T02:00:06.336Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["rust","websockets"],"created_at":"2024-07-31T03:01:21.331Z","updated_at":"2025-11-12T21:27:13.162Z","avatar_url":"https://github.com/snapview.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","_Table of Contents_","库","Tools per Language"],"sub_categories":["Web programming","网络编程 Web programming","Websockets","网页编程","Rust","web编程 Web programming"],"readme":"# Tungstenite\n\nLightweight stream-based WebSocket implementation for [Rust](https://www.rust-lang.org/).\n\n```rust\nuse std::net::TcpListener;\nuse std::thread::spawn;\nuse tungstenite::accept;\n\n/// A WebSocket echo server\nfn main () {\n    let server = TcpListener::bind(\"127.0.0.1:9001\").unwrap();\n    for stream in server.incoming() {\n        spawn (move || {\n            let mut websocket = accept(stream.unwrap()).unwrap();\n            loop {\n                let msg = websocket.read().unwrap();\n\n                // We do not want to send back ping/pong messages.\n                if msg.is_binary() || msg.is_text() {\n                    websocket.send(msg).unwrap();\n                }\n            }\n        });\n    }\n}\n```\n\nTake a look at the examples section to see how to write a simple client/server.\n\n**NOTE:** `tungstenite-rs` is more like a barebone to build reliable modern networking applications\nusing WebSockets. If you're looking for a modern production-ready \"batteries included\" WebSocket\nlibrary that allows you to efficiently use non-blocking sockets and do \"full-duplex\" communication,\ntake a look at [`tokio-tungstenite`](https://github.com/snapview/tokio-tungstenite).\n\n[![MIT licensed](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE-MIT)\n[![Apache-2.0 licensed](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](./LICENSE-APACHE)\n[![Crates.io](https://img.shields.io/crates/v/tungstenite.svg?maxAge=2592000)](https://crates.io/crates/tungstenite)\n[![Build Status](https://github.com/snapview/tungstenite-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/snapview/tungstenite-rs/actions)\n\n[Documentation](https://docs.rs/tungstenite)\n\nIntroduction\n------------\nThis library provides an implementation of WebSockets,\n[RFC6455](https://tools.ietf.org/html/rfc6455). It allows for both synchronous (like TcpStream)\nand asynchronous usage and is easy to integrate into any third-party event loops including\n[MIO](https://github.com/tokio-rs/mio). The API design abstracts away all the internals of the\nWebSocket protocol but still makes them accessible for those who wants full control over the\nnetwork.\n\nWhy Tungstenite?\n----------------\n\nIt's formerly WS2, the 2nd implementation of WS. WS2 is the chemical formula of\ntungsten disulfide, the tungstenite mineral.\n\nFeatures\n--------\n\nTungstenite provides a complete implementation of the WebSocket specification.\nTLS is supported on all platforms using `native-tls` or `rustls`. The following\nfeatures are available:\n\n* `native-tls`\n* `native-tls-vendored`\n* `rustls-tls-native-roots`\n* `rustls-tls-webpki-roots`\n\nChoose the one that is appropriate for your needs.\n\nBy default **no TLS feature is activated**, so make sure you use one of the TLS features,\notherwise you won't be able to communicate with the TLS endpoints.\n\nThere is no support for permessage-deflate at the moment, but the PRs are welcome :wink:\n\nTesting\n-------\n\nTungstenite is thoroughly tested and passes the [Autobahn Test Suite](https://github.com/crossbario/autobahn-testsuite) for\nWebSockets. It is also covered by internal unit tests as well as possible.\n\nBenchmark\n---------\nBenches are in [./benches](./benches/).\n* Run all with `cargo bench --bench \\* -- --quick --noplot`\n* Run a particular set with, say \"e2e\", with `cargo bench --bench e2e -- --quick --noplot`\n\nContributing\n------------\n\nPlease report bugs and make feature requests [here](https://github.com/snapview/tungstenite-rs/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapview%2Ftungstenite-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnapview%2Ftungstenite-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnapview%2Ftungstenite-rs/lists"}