[package] name = "reconnecting-websocket" description = "A wrapper around gloo::net::websocket::futures::WebSocket that reconnects when the socket drops. Uses exponential-backoff::Backoff to determine the delay between reconnects" authors = [ "daniel_ "] version = "0.3.2" edition = "2021" license = "MIT" homepage = "https://github.com/cs2dsb/reconnecting-websocket.rs" repository = "https://github.com/cs2dsb/reconnecting-websocket.rs" keywords = [ "websocket", "wasm"] categories = ["asynchronous", "network-programming", "wasm", "web-programming::websocket"] documentation = "https://docs.rs/reconnecting-websocket" readme = "./README.md" [features] default = [ "tracing", "state-events" ] tracing = [ "dep:tracing"] # When enabled, the stream will output state change events in addition to messages state-events = [] [dependencies] exponential-backoff = "1.2.0" futures = "0.3.30" gloo = { version = "0.11.0", features = ["net", "timers", "utils", "futures"], default-features = false } thiserror = "1.0.61" tracing = { version = "0.1.40", optional = true } wasm-bindgen-futures = "0.4.42" web-sys = { version = "0.3.69", features = ["Window"] } # Needed to enable the js feature for exponential-backoff (jitter) getrandom = { version = "0.2.15", features = ["js"] } cfg-if = "1.0.0" [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3.42" [dev-dependencies] tracing = "0.1.40" tracing-web = "0.1.3" tracing-subscriber = { version = "0.3.18", features = [ "time" ] } time = { version = "0.3.36", features = ["wasm-bindgen"] } merge-streams = "0.1.2" [badges] maintenance = { status = "experimental" } github = { repository = "cs2dsb/reconnecting-websocket.rs" }