[package] name = "tokio-tungstenite-wasm" version = "0.3.1" description = "A wrapper around websys and tokio-tungstenite that makes it easy to use websockets cross-platform." repository = "https://github.com/TannerRogalsky/tokio-tungstenite-wasm" homepage = "https://github.com/TannerRogalsky/tokio-tungstenite-wasm" license-file = "LICENSE" readme = "README.md" edition = "2021" categories = [ "wasm", "web-programming::websocket", "asynchronous", "network-programming", ] keywords = ["websocket", "cross-platform", "wasm", "tokio"] [features] native-tls = ["tokio-tungstenite/native-tls", "dep:native-tls"] native-tls-vendored = ["native-tls", "tokio-tungstenite/native-tls-vendored"] rustls-tls-native-roots = [ "__rustls-tls", "tokio-tungstenite/rustls-tls-native-roots", ] rustls-tls-webpki-roots = [ "__rustls-tls", "tokio-tungstenite/rustls-tls-webpki-roots", ] __rustls-tls = ["dep:rustls"] [dependencies] thiserror = "1.0" http = "1.1" httparse = "1.3" futures-util = { version = "0.3", default-features = false, features = [ "sink", "std", ] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] tokio-tungstenite = "0.21" tokio = { version = "1.36", default-features = false, features = ["net"] } native-tls = { version = "0.2", default-features = false, optional = true } rustls = { version = "0.22", default-features = false, optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = "0.2" js-sys = "0.3" futures-channel = { version = "0.3" } [target.'cfg(target_arch = "wasm32")'.dependencies.web-sys] version = "0.3" features = [ "WebSocket", "MessageEvent", "CloseEvent", "Event", "ErrorEvent", "BinaryType", "Blob", ] [dev-dependencies] assert-impl = "0.1" [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] tokio = { version = "1.36", features = ["full"] } rand = "0.8"