[package]
name = "ewebsock"
version = "0.8.0"
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
description = "WebSocket client that works natively and on the web (WASM)"
edition = "2021"
rust-version = "1.76"
license = "MIT OR Apache-2.0"
readme = "../README.md"
homepage = "https://github.com/rerun-io/ewebsock"
repository = "https://github.com/rerun-io/ewebsock"
categories = ["web-programming", "wasm"]
keywords = ["websocket", "websockets", "portable", "native", "web"]
include = ["../LICENSE-APACHE", "../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
[package.metadata.docs.rs]
all-features = true
targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"]
[lints]
workspace = true
[features]
default = []
tls = ["tungstenite/rustls-tls-webpki-roots"]
tokio = [
"dep:async-stream",
"dep:futures",
"dep:futures-util",
"dep:tokio",
"dep:tokio-tungstenite",
]
[dependencies]
document-features.workspace = true
log.workspace = true
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tungstenite.workspace = true
async-stream = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
futures-util = { workspace = true, optional = true, default-features = false, features = [
"sink",
"std",
] }
tokio = { workspace = true, features = ["rt", "sync"], optional = true }
tokio-tungstenite = { workspace = true, optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys.workspace = true
wasm-bindgen.workspace = true
wasm-bindgen-futures.workspace = true
web-sys = { workspace = true, features = [
"BinaryType",
"Blob",
"ErrorEvent",
"FileReader",
"MessageEvent",
"ProgressEvent",
"WebSocket",
] }