[package] name = "async-wsocket" version = "0.11.0" edition = "2021" description = "A convenience library for using websockets both in native and WASM environments! Include embedded tor client support." authors = ["Yuki Kishimoto "] homepage = "https://github.com/yukibtc/async-wsocket" repository = "https://github.com/yukibtc/async-wsocket.git" license = "MIT" readme = "README.md" categories = ["asynchronous", "network-programming", "api-bindings", "wasm", "web-programming::websocket"] keywords = ["async", "tokio", "wasm", "websocket"] [features] default = [] socks = ["dep:tokio-socks"] tor = ["dep:arti-client", "dep:tor-hsservice", "dep:tor-hsrproxy", "dep:tor-rtcompat"] [dependencies] futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] } url = { version = "2.5", default-features = false } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio = { version = "1", features = ["net", "sync", "time"] } tokio-rustls = { version = "0.26", default-features = false, features = ["ring", "tls12"] } # Required to enable the needed features for tokio-tungstenite tokio-socks = { version = "0.5", optional = true } tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] } # TOR deps arti-client = { version = "0.22", default-features = false, features = ["onion-service-client", "onion-service-service", "rustls", "static-sqlite", "tokio"], optional = true } tor-hsservice = { version = "0.22", default-features = false, optional = true } tor-hsrproxy = { version = "0.22", default-features = false, optional = true } tor-rtcompat = { version = "0.22", default-features = false, features = ["rustls", "tokio"], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] async-utility = "0.3" futures = { version = "0.3", default-features = false, features = ["std"] } # TODO: remove this js-sys = "0.3" wasm-bindgen = "0.2" web-sys = { version = "0.3", features = ["BinaryType", "Blob", "CloseEvent", "ErrorEvent", "MessageEvent", "DomException", "WebSocket"] } [dev-dependencies] tokio = { version = "1", features = ["macros"] } tracing-subscriber = { version = "0.3", features = ["env-filter"] } [[example]] name = "client" required-features = ["tor"] [[example]] name = "hs-server" required-features = ["tor"]