{"id":27631164,"url":"https://github.com/shadowylab/async-wsocket","last_synced_at":"2025-12-12T14:12:48.623Z","repository":{"id":217457368,"uuid":"743918125","full_name":"shadowylab/async-wsocket","owner":"shadowylab","description":"A convenience library for using websockets both in native and WASM environments!","archived":false,"fork":false,"pushed_at":"2025-03-18T08:28:02.000Z","size":305,"stargazers_count":4,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T16:51:15.882Z","etag":null,"topics":["native","rust-lang","wasm","websocket"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/async-wsocket","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/shadowylab.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},"funding":{"custom":["https://getalby.com/p/yuki"]}},"created_at":"2024-01-16T09:09:54.000Z","updated_at":"2025-04-09T23:19:35.000Z","dependencies_parsed_at":"2024-01-16T15:57:52.355Z","dependency_job_id":"7ff493f3-9512-42ac-9697-eb6c055a9604","html_url":"https://github.com/shadowylab/async-wsocket","commit_stats":null,"previous_names":["yukibtc/async-wsocket"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowylab%2Fasync-wsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowylab%2Fasync-wsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowylab%2Fasync-wsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shadowylab%2Fasync-wsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shadowylab","download_url":"https://codeload.github.com/shadowylab/async-wsocket/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250482952,"owners_count":21437970,"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":["native","rust-lang","wasm","websocket"],"created_at":"2025-04-23T17:42:35.579Z","updated_at":"2025-12-12T14:12:48.581Z","avatar_url":"https://github.com/shadowylab.png","language":"Rust","funding_links":["https://getalby.com/p/yuki"],"categories":[],"sub_categories":[],"readme":"# Async WebSocket\n\nA convenience library for using websockets both in native and WASM environments! Include embedded tor client support.\n\n```rust\nuse std::time::Duration;\n\nuse async_wsocket::{ConnectionMode, Url, WsMessage};\nuse futures_util::{SinkExt, StreamExt};\n\nconst NONCE: u64 = 123456789;\n\n#[tokio::main]\nasync fn main() {\n    let url =\n        Url::parse(\"ws://oxtrdevav64z64yb7x6rjg4ntzqjhedm5b5zjqulugknhzr46ny2qbad.onion\").unwrap();\n    let (mut tx, mut rx) =\n        async_wsocket::connect(\u0026url, ConnectionMode::tor(), Duration::from_secs(120))\n            .await\n            .unwrap();\n\n    // Send ping\n    let nonce = NONCE.to_be_bytes().to_vec();\n    tx.send(WsMessage::Ping(nonce.clone())).await.unwrap();\n\n    // Listen for messages\n    while let Some(msg) = rx.next().await {\n        if let Ok(WsMessage::Pong(bytes)) = msg {\n            assert_eq!(nonce, bytes);\n            println!(\"Pong match!\");\n            break;\n        }\n    }\n}\n```\n\n## Crate Feature Flags\n\nThe following crate feature flags are available:\n\n| Feature               | Default | Description                                                             |\n|-----------------------|:-------:|-------------------------------------------------------------------------|\n| `socks`               |   No    | Enable `socks` proxy support                                            |\n| `tor`                 |   No    | Enable embedded tor client support                                      |\n| `tor-launch-service ` |   No    | Enable embedded tor client with support to launch hidden onion services |\n\n## Minimum Supported Rust Version (MSRV)\n\nThe MSRV for this project when compiled with `default` features and on `native` targets is `1.63.0`. \nWhen using `tor` feature, MSRV is `1.70.0`. MSRV for WASM targets is `1.73.0`\n\n## License\n\nThis project is distributed under the MIT software license - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowylab%2Fasync-wsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshadowylab%2Fasync-wsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshadowylab%2Fasync-wsocket/lists"}