-
Notifications
You must be signed in to change notification settings - Fork 9
/
Cargo.toml
121 lines (99 loc) · 4.35 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[package]
name = "tokio-websockets"
version = "0.9.0"
edition = "2021"
description = "High performance, strict, tokio-util based WebSockets implementation"
categories = ["web-programming::websocket", "network-programming", "asynchronous", "concurrency"]
repository = "https://github.com/Gelbpunkt/tokio-websockets/"
rust-version = "1.79"
license = "MIT"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bytes = "1.7"
futures-core = "0.3"
futures-sink = "0.3"
tokio = "1"
# tokio-util 0.7.3 is the first to depend on tracing without default features, otherwise minvers break
tokio-util = { version = "0.7.3", features = ["codec", "io"] }
# SHA-1 fallback when no TLS is enabled
sha1_smol = { version = "1.0", optional = true }
# Randomness providers
fastrand = { version = "2.0", default-features = false, features = ["std"], optional = true }
getrandom = { version = "0.2", default-features = false, optional = true }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"], optional = true }
# SIMD
# We enable aarch64_neon feature because it is MSRV-gated but ours is higher than 1.59
simdutf8 = { version = "0.1", default-features = false, features = ["std", "aarch64_neon"], optional = true }
# Client
base64 = { version = "0.22", optional = true }
http = { version = "1", default-features = false, features = ["std"], optional = true }
httparse = { version = "1.6", optional = true }
# Native TLS
tokio-native-tls = { version = "0.3", optional = true }
# Rustls
aws-lc-rs = { version = "1", default-features = false, features = ["aws-lc-sys"], optional = true }
ring = { version = "0.17", default-features = false, optional = true }
rustls-native-certs = { version = "0.7", default-features = false, optional = true }
rustls-pki-types = { version = "1", optional = true }
rustls-platform-verifier = { version = "0.3", optional = true }
tokio-rustls = { version = "0.26", default-features = false, optional = true }
webpki-roots = { version = "0.26", default-features = false, optional = true }
# Users can manually tune into OpenSSL for SHA-1 when native-tls is enabled
openssl = { version = "0.10", default-features = false, optional = true }
[features]
client = ["dep:base64", "dep:http", "dep:httparse", "tokio/net", "tokio/io-util"]
aws_lc_rs = ["dep:aws-lc-rs", "tokio-rustls?/aws_lc_rs"] # Underscores for consistency with other rustls crates
aws-lc-rs = ["aws_lc_rs"] # Alias because Cargo features commonly use `-`
fips = ["aws_lc_rs", "aws-lc-rs?/fips", "tokio-rustls?/fips"]
ring = ["dep:ring", "tokio-rustls?/ring"]
server = ["dep:base64", "dep:http", "dep:httparse", "tokio/io-util"]
simd = ["dep:simdutf8"]
native-tls = ["dep:tokio-native-tls"]
rustls-webpki-roots = ["dep:rustls-pki-types", "dep:tokio-rustls", "dep:webpki-roots"]
rustls-native-roots = ["dep:rustls-pki-types", "dep:tokio-rustls", "dep:rustls-native-certs"]
rustls-platform-verifier = ["dep:rustls-pki-types", "dep:tokio-rustls", "dep:rustls-platform-verifier"]
rustls-tls12 = ["tokio-rustls?/tls12"]
nightly = ["simdutf8?/aarch64_neon_prefetch"]
[dev-dependencies]
futures-util = { version = "0.3.14", default-features = false, features = ["sink"] }
rustls-pemfile = "2"
rustls-pki-types = "1"
tokio = { version = "1", default-features = false, features = ["net", "macros", "rt-multi-thread"] }
tokio-rustls = "0.26"
[[example]]
name = "autobahn_client"
required-features = ["client"]
[[example]]
name = "autobahn_server"
required-features = ["server"]
[[example]]
name = "client"
required-features = ["client"]
[[example]]
name = "echo_server"
required-features = ["server"]
[[example]]
name = "native_tls_self_signed_client"
required-features = ["client", "native-tls"]
[[example]]
name = "rustls_server"
required-features = ["server"]
[[example]]
name = "server"
required-features = ["server"]
[[example]]
name = "utf8_benchmark_client"
required-features = ["client"]
[[example]]
name = "utf8_benchmark_server"
required-features = ["server"]
[package.metadata.docs.rs]
# aws_lc_rs' fips mode can't be built in docs.rs
features = ["client", "aws_lc_rs", "ring", "fastrand", "getrandom", "rand", "server", "simd", "native-tls", "rustls-native-roots", "rustls-webpki-roots", "rustls-platform-verifier", "rustls-tls12", "nightly"]
rustdoc-args = ["--cfg", "docsrs"]
[profile.release]
codegen-units = 1
debug = false
incremental = false
lto = true
opt-level = 3