-
Notifications
You must be signed in to change notification settings - Fork 13
/
Cargo.toml
101 lines (83 loc) · 2.75 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[package]
name = "ezsockets"
version = "0.6.4"
edition = "2021"
authors = ["Grzegorz Barański <me@gbaranski.com>"]
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