{"id":13648593,"url":"https://github.com/najamelan/ws_stream_wasm","last_synced_at":"2026-04-07T04:31:39.338Z","repository":{"id":49364306,"uuid":"197435125","full_name":"najamelan/ws_stream_wasm","owner":"najamelan","description":"Wasm convenience API for WebSockets","archived":false,"fork":false,"pushed_at":"2025-06-08T15:50:09.000Z","size":304,"stargazers_count":107,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"dev","last_synced_at":"2025-12-14T01:59:22.287Z","etag":null,"topics":["crates","rust","wasm","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/najamelan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","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},"funding":{"liberapay":"najamelan"}},"created_at":"2019-07-17T17:36:33.000Z","updated_at":"2025-11-19T19:22:54.000Z","dependencies_parsed_at":"2024-06-14T21:57:02.324Z","dependency_job_id":"a431c9fa-c01f-4c62-b459-43aede15e18a","html_url":"https://github.com/najamelan/ws_stream_wasm","commit_stats":{"total_commits":172,"total_committers":3,"mean_commits":"57.333333333333336","dds":"0.011627906976744207","last_synced_commit":"4035d4657388040938f22829fef2628c1243bbfa"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/najamelan/ws_stream_wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najamelan%2Fws_stream_wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najamelan%2Fws_stream_wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najamelan%2Fws_stream_wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najamelan%2Fws_stream_wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/najamelan","download_url":"https://codeload.github.com/najamelan/ws_stream_wasm/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/najamelan%2Fws_stream_wasm/sbom","scorecard":{"id":673160,"data":{"date":"2025-08-11","repo":{"name":"github.com/najamelan/ws_stream_wasm","commit":"d8c950a46fba5584a7c93c4717197c586404dc87"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/27 approved changesets -- score normalized to 0","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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":7,"reason":"8 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/najamelan/ws_stream_wasm/ci.yml/dev?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: The Unlicense: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/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/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'dev'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"49 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2021-0127","Warn: Project is vulnerable to: RUSTSEC-2022-0078 / GHSA-f85w-wvc7-crwc","Warn: Project is vulnerable to: RUSTSEC-2019-0036 / RUSTSEC-2020-0036 / GHSA-jq66-xh47-j9f3 / GHSA-r98r-j25q-rmpr","Warn: Project is vulnerable to: RUSTSEC-2020-0070 / GHSA-5wg8-7c9q-794v / GHSA-gmv4-vmx3-x9f3 / GHSA-hj9h-wrgg-hgmx / GHSA-ppj3-7jw3-8vc4 / GHSA-vh4p-6j7g-f4j9","Warn: Project is vulnerable to: RUSTSEC-2019-0035 / GHSA-mmc9-pwm7-qj5w","Warn: Project is vulnerable to: RUSTSEC-2022-0013 / GHSA-m5pq-gvj9-9vr8","Warn: Project is vulnerable to: RUSTSEC-2019-0025 / GHSA-xr7r-88qv-q7hm","Warn: Project is vulnerable to: RUSTSEC-2018-0018 / GHSA-55m5-whcv-c49c / GHSA-66p5-j55p-32r9","Warn: Project is vulnerable to: RUSTSEC-2021-0003 / GHSA-43w2-9j62-hq99","Warn: Project is vulnerable to: RUSTSEC-2022-0006 / GHSA-9hpw-r23r-xgm5","Warn: Project is vulnerable to: RUSTSEC-2023-0028","Warn: Project is vulnerable to: RUSTSEC-2020-0159","Warn: Project is vulnerable to: RUSTSEC-2021-0093 / GHSA-pqqp-xmhj-wgcw","Warn: Project is vulnerable to: RUSTSEC-2022-0021 / GHSA-6888-wf7j-34jq","Warn: Project is vulnerable to: RUSTSEC-2022-0041 / GHSA-qc84-gqf4-9926","Warn: Project is vulnerable to: RUSTSEC-2020-0146 / GHSA-3358-4f7f-p4j4","Warn: Project is vulnerable to: RUSTSEC-2023-0034 / GHSA-f8vr-r385-rh5r","Warn: Project is vulnerable to: RUSTSEC-2024-0003 / GHSA-8r5v-vm4m-4g25","Warn: Project is vulnerable to: RUSTSEC-2024-0332 / GHSA-q6cp-qfwq-4gcv","Warn: Project is vulnerable to: RUSTSEC-2019-0034 / GHSA-6rhx-hqxm-8p36","Warn: Project is vulnerable to: RUSTSEC-2019-0033 / GHSA-x7vr-c387-8w57","Warn: Project is vulnerable to: RUSTSEC-2020-0008 / GHSA-h3qr-rq2j-74w4","Warn: Project is vulnerable to: RUSTSEC-2021-0020 / GHSA-6hfq-h8hq-87mf","Warn: Project is vulnerable to: RUSTSEC-2021-0079 / GHSA-5h46-h7hh-c6x9","Warn: Project is vulnerable to: RUSTSEC-2021-0078 / GHSA-f3pg-qwvg-p99c","Warn: Project is vulnerable to: RUSTSEC-2022-0022 / GHSA-f67m-9j94-qv9j","Warn: Project is vulnerable to: RUSTSEC-2024-0421 / GHSA-h97m-ww89-6jmq","Warn: Project is vulnerable to: RUSTSEC-2023-0045 / GHSA-wfg4-322g-9vqv","Warn: Project is vulnerable to: RUSTSEC-2020-0080","Warn: Project is vulnerable to: RUSTSEC-2023-0050","Warn: Project is vulnerable to: RUSTSEC-2020-0078 / GHSA-458v-4hrf-g3m4 / GHSA-c79c-gwph-gqfm","Warn: Project is vulnerable to: RUSTSEC-2020-0016","Warn: Project is vulnerable to: RUSTSEC-2019-0017 / GHSA-7j44-fv4x-79g9","Warn: Project is vulnerable to: RUSTSEC-2023-0022 / GHSA-3gxf-9r58-2ghg","Warn: Project is vulnerable to: RUSTSEC-2023-0024 / GHSA-6hcf-g6gr-hhcr","Warn: Project is vulnerable to: RUSTSEC-2023-0023 / GHSA-9qwg-crg9-m2vc","Warn: Project is vulnerable to: RUSTSEC-2023-0044 / GHSA-xcf7-rvmh-g6q4","Warn: Project is vulnerable to: RUSTSEC-2023-0072","Warn: Project is vulnerable to: GHSA-q445-7m23-qrmw","Warn: Project is vulnerable to: RUSTSEC-2024-0357","Warn: Project is vulnerable to: RUSTSEC-2025-0004 / GHSA-rpmj-rpgj-qmpm","Warn: Project is vulnerable to: RUSTSEC-2022-0040 / GHSA-9qxh-258v-666c","Warn: Project is vulnerable to: RUSTSEC-2023-0018 / GHSA-mc8h-8q98-g5hr","Warn: Project is vulnerable to: RUSTSEC-2023-0081","Warn: Project is vulnerable to: RUSTSEC-2020-0071 / GHSA-wcg3-cvx6-7396","Warn: Project is vulnerable to: RUSTSEC-2021-0124 / GHSA-fg7r-2g4j-5cgr","Warn: Project is vulnerable to: RUSTSEC-2023-0065 / GHSA-9mcr-873m-xcxp","Warn: Project is vulnerable to: RUSTSEC-2021-0146","Warn: Project is vulnerable to: RUSTSEC-2022-0082 / GHSA-8v4j-7jgf-5rg9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T20:49:15.109Z","repository_id":49364306,"created_at":"2025-08-21T20:49:15.109Z","updated_at":"2025-08-21T20:49:15.109Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["crates","rust","wasm","websockets"],"created_at":"2024-08-02T01:04:22.617Z","updated_at":"2026-04-07T04:31:39.308Z","avatar_url":"https://github.com/najamelan.png","language":"Rust","funding_links":["https://liberapay.com/najamelan"],"categories":["Rust"],"sub_categories":[],"readme":"# ws_stream_wasm\n\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Build Status](https://github.com/najamelan/ws_stream_wasm/workflows/ci/badge.svg?branch=release)](https://github.com/najamelan/ws_stream_wasm/actions)\n[![Docs](https://docs.rs/ws_stream_wasm/badge.svg)](https://docs.rs/ws_stream_wasm)\n[![crates.io](https://img.shields.io/crates/v/ws_stream_wasm.svg)](https://crates.io/crates/ws_stream_wasm)\n\n\n\u003e A convenience library for using web sockets in WASM\n\nThe _web-sys_ bindings for websockets aren't very convenient to use directly. This crates hopes to alleviate that. Browsers can't create direct TCP connections, and by putting `AsyncRead`/`AsyncWrite` on top of websockets, we can use interfaces that work over any async byte streams from within the browser. The crate has 2 main types. The `WsMeta` type exists to allow access to the web API while you pass `WsStream` to combinators that take ownership of the stream.\n\nNote: a [proposal](https://github.com/WICG/direct-sockets/blob/main/docs/explainer.md) exists and is already available in Chrome based browsers to allow direct TCP connections from [isolated web apps](https://github.com/WICG/isolated-web-apps/blob/main/README.md). \n\n**features:**\n- [`WsMeta`]: A wrapper around [`web_sys::WebSocket`].\n- [`WsMessage`]: A simple rusty representation of a WebSocket message.\n- [`WsStream`]: A _futures_ `Sink`/`Stream` of `WsMessage`.\n                It also has a method `into_io()` which let's you get a wrapper that implements `AsyncRead`/`AsyncWrite`/`AsyncBufRead` (_tokio_ version behind the feature `tokio_io`).\n- [`WsEvent`]: [`WsMeta`] is observable with [pharos](https://crates.io/crates/pharos) for events (mainly useful for connection close).\n\n**NOTE:** this crate only works on WASM. If you want a server side equivalent that implements `AsyncRead`/`AsyncWrite` over\nWebSockets, check out [ws_stream_tungstenite](https://crates.io/crates/ws_stream_tungstenite).\n\n**missing features:**\n- no automatic reconnect\n- not all features are thoroughly tested. Notably, I have little use for extensions and sub-protocols. Tungstenite,\n  which I use for the server end (and for automated testing) doesn't support these, making it hard to write unit tests.\n\n## Table of Contents\n\n- [Install](#install)\n  - [Upgrade](#upgrade)\n  - [Dependencies](#dependencies)\n- [Usage](#usage)\n  - [API](#api)\n- [References](#references)\n- [Contributing](#contributing)\n  - [Code of Conduct](#code-of-conduct)\n- [License](#license)\n\n\n## Install\nWith [cargo add](https://github.com/killercup/cargo-edit):\n`cargo add ws_stream_wasm`\n\nWith [cargo yaml](https://gitlab.com/storedbox/cargo-yaml):\n```yaml\ndependencies:\n\n  ws_stream_wasm: ^0.7\n```\n\nIn Cargo.toml:\n```toml\n[dependencies]\n\n   ws_stream_wasm = \"0.7\"\n```\n\n### Upgrade\n\nPlease check out the [changelog](https://github.com/najamelan/ws_stream_wasm/blob/release/CHANGELOG.md) when upgrading.\n\n### Dependencies\n\nThis crate has few dependencies. Cargo will automatically handle it's dependencies for you.\n\nThere is one optional features. The `tokio_io` features causes the `WsIo` returned from [`WsStream::into_io`] to implement the\ntokio version of AsyncRead/AsyncWrite.\n\n\n## Usage\n\nThe [integration tests](https://github.com/najamelan/ws_stream_wasm/tree/release/tests) show most features in action. The\nexample directory doesn't currently hold any interesting examples.\n\nThe types in this library are `Send` + `Sync` as far as the compiler is concerned. This is so that you can use them with general purpose\nlibraries that also work on WASM but that require a connection to be `Send`/`Sync`. Currently WASM has no threads though and most\nunderlying types we use aren't `Send`. The solution for the moment is to use [`send_wrapper::SendWrapper`]. This will panic\nif it's ever dereferenced on a different thread than where it's created. You have to consider that the types aren't `Send`, but\non WASM it's safe to pass them to an API that requires `Send`, because there is not much multi-threading support. Thus passing it to\nthe bindgen executor will be fine. However with webworkers you can make extra threads nevertheless. The responsibility is on you\nto assure you don't try to use the Web Api's on different threads.\n\nThe main entrypoint you'll want to use, eg to connect, is [`WsMeta::connect`].\n\n### Basic events example\n```rust\nuse\n{\n   ws_stream_wasm       :: *                        ,\n   pharos               :: *                        ,\n   wasm_bindgen         :: UnwrapThrowExt           ,\n   wasm_bindgen_futures :: spawn_local ,\n   futures              :: stream::StreamExt        ,\n};\n\nlet program = async\n{\n   let (mut ws, _wsio) = WsMeta::connect( \"ws://127.0.0.1:3012\", None ).await\n\n      .expect_throw( \"assume the connection succeeds\" );\n\n   let mut evts = ws.observe( ObserveConfig::default() ).await.expect_throw( \"observe\" );\n\n   ws.close().await;\n\n   // Note that since WsMeta::connect resolves to an opened connection, we don't see\n   // any Open events here.\n   //\n   assert!( evts.next().await.unwrap_throw().is_closing() );\n   assert!( evts.next().await.unwrap_throw().is_closed () );\n};\n\nspawn_local( program );\n```\n\n### Filter events example\n\nThis shows how to filter events. The functionality comes from _pharos_ which we use to make\n[`WsMeta`] observable.\n\n```rust\nuse\n{\n   ws_stream_wasm       :: *                 ,\n   pharos               :: *                 ,\n   wasm_bindgen         :: UnwrapThrowExt    ,\n   wasm_bindgen_futures :: spawn_local       ,\n   futures              :: stream::StreamExt ,\n};\n\nlet program = async\n{\n   let (mut ws, _wsio) = WsMeta::connect( \"ws://127.0.0.1:3012\", None ).await\n\n      .expect_throw( \"assume the connection succeeds\" );\n\n   // The Filter type comes from the pharos crate.\n   //\n   let mut evts = ws.observe( Filter::Pointer( WsEvent::is_closed ).into() ).await.expect_throw( \"observe\" );\n\n   ws.close().await;\n\n   // Note we will only get the closed event here, the WsEvent::Closing has been filtered out.\n   //\n   assert!( evts.next().await.unwrap_throw().is_closed () );\n};\n\nspawn_local( program );\n```\n\n## API\n\nApi documentation can be found on [docs.rs](https://docs.rs/ws_stream_wasm).\n\n\n## References\nThe reference documents for understanding web sockets and how the browser handles them are:\n- [HTML Living Standard](https://html.spec.whatwg.org/multipage/web-sockets.html)\n- [RFC 6455 - The WebSocket Protocol](https://tools.ietf.org/html/rfc6455)\n\n\n## Contributing\n\nPlease check out the [contribution guidelines](https://github.com/najamelan/ws_stream_wasm/blob/release/CONTRIBUTING.md).\n\n\n### Testing\n\nFor testing we need back-end servers to echo data back to the tests. These are in the `ws_stream_tungstenite` crate.\n```bash\ngit clone https://github.com/najamelan/ws_stream_tungstenite\ncd ws_stream_tungstenite\ncargo run --example echo --release\n\n# in a different terminal:\ncargo run --example echo_tt --release -- \"127.0.0.1:3312\"\n\n# in a different terminal:\ncd examples/ssl\ncargo run --release -- \"127.0.0.1:8443\"\n\n# the second server is pure async-tungstenite without ws_stream_tungstenite wrapping it in AsyncRead/Write. This\n# is needed for testing a WsMessage::Text because ws_stream_tungstenite only does binary.\n\n# in a third terminal, in ws_stream_wasm you have different options:\nwasm-pack test --firefox [--headless] [--release]\nwasm-pack test --chrome  [--headless] [--release]\n```\n\nIn general chrome is well faster. When running it in the browser (without `--headless`) you get trace logging\nin the console, which helps debugging. In chrome you need to enable verbose output in the console,\notherwise only info and up level are reported.\n\n### Code of conduct\n\nAny of the behaviors described in [point 4 \"Unacceptable Behavior\" of the Citizens Code of Conduct](https://github.com/stumpsyn/policies/blob/master/citizen_code_of_conduct.md#4-unacceptable-behavior) are not welcome here and might get you banned. If anyone, including maintainers and moderators of the project, fail to respect these/your limits, you are entitled to call them out.\n\n## License\n\n[Unlicence](https://unlicense.org/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajamelan%2Fws_stream_wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnajamelan%2Fws_stream_wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnajamelan%2Fws_stream_wasm/lists"}