[package] name = "ezsockets" version = "0.6.4" edition = "2021" authors = ["Grzegorz BaraƄski "] description = "WebSockets server & client made easy" readme = "README.md" repository = "https://github.com/gbaranski/ezsockets" license = "MIT" keywords = ["websocket", "networking", "async", "wasm"] categories = ["asynchronous", "network-programming", "web-programming::websocket"] [lib] crate-type = ["cdylib", "rlib"] [dependencies] async-channel = "1.9.0" async-trait = "0.1.52" atomic_enum = "0.2.0" base64 = "0.21.0" enfync = "0.1.0" futures = "0.3.21" futures-util = { version = "0.3.25", default-features = false } http = "0.2.8" tracing = "0.1.31" tungstenite = "0.20.0" url = "2.2.2" cfg-if = "1.0.0" axum = { version = "0.6.1", optional = true } axum-core = { version = "0.3.0", optional = true } bytes = { version = "1.3.0", optional = true } fragile = { version = "2.0", optional = true } http-body = { version = "0.4.5", optional = true } hyper = { version = "0.14.23", optional = true } sha-1 = { version = "0.10.1", optional = true } tokio-tungstenite = { version = "0.20.0", optional = true } tokio-tungstenite-wasm = { version = "0.2.1", optional = true } tokio-rustls = { version = "0.24.1", optional = true } tokio-native-tls = { version = "0.3.1", optional = true } [target.'cfg(not(target_family = "wasm"))'.dependencies] tokio = { version = "1.17.0", features = ["sync", "macros", "time"] } [target.'cfg(target_family = "wasm")'.dependencies] getrandom = { version = "0.2", features = ["js"] } wasm-bindgen-futures = "0.4" wasmtimer = "0.2.0" [features] default = ["native_client", "server"] client = ["tokio-tungstenite-wasm"] native_client = ["client", "tokio/rt", "tokio-tungstenite"] wasm_client = ["client", "fragile"] server = ["tokio-tungstenite", "tokio-tungstenite-wasm", "tokio/rt"] tungstenite = ["server"] axum = ["server", "dep:axum", "axum-core", "bytes", "futures-util/alloc", "http-body", "hyper", "sha-1"] tls = [] native-tls = ["tls", "tokio-native-tls", "tokio-tungstenite/native-tls"] rustls = ["tls", "tokio-rustls", "tokio-tungstenite/rustls-tls-webpki-roots"] [dev-dependencies] tokio = { version = "1.17.0", features = ["full"] } tracing-subscriber = "0.3.9" criterion = "0.4" rand = "0.8.5" [package.metadata.docs.rs] # document all features all-features = true rustdoc-args = ["--cfg", "docsrs"] [workspace] members = [ "examples/chat-client", "examples/chat-client-wasm", "examples/chat-server", "examples/chat-server-axum", "examples/echo-server", "examples/echo-server-native-tls", "examples/simple-client", "examples/counter-server" ] [[test]] name = "axum" required-features = ["axum"] [[test]] name = "tungstenite" required-features = ["tungstenite"] [[bench]] name = "my_benchmark" harness = false