-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
65 lines (52 loc) · 2.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
[package]
name = "tcp-handler"
version = "1.0.2"
authors = ["xuxiaocheng <[email protected]>"]
edition = "2021"
description = "Conveniently transfer data in chunk through tokio TCP stream."
readme = "README.md"
license = "MIT OR Apache-2.0"
repository = "https://github.com/xuxiaocheng0201/tcp-handler/"
documentation = "https://docs.rs/tcp-handler/"
categories = ["network-programming"]
keywords = ["tcp", "tokio", "bytes", "io", "network"]
[dependencies]
thiserror = "^2"
once_cell = "^1"
tokio = { version = "^1", features = ["rt-multi-thread"] }
bytes = "^1"
variable-len-reader = { version = "^3.2", default-features = false, features = ["std", "tokio-comp", "bytes",
"async_raw", "async_bools", "async_varint_size", "async_string"] }
flate2 = { version = "^1", optional = true }
rand = { version = "~0.8", optional = true }
__aead_with_feature = { package = "aead", version = "0", optional = true, default-features = false, features = ["bytes"] }
rsa = { version = "~0.9", optional = true, default-features = false, features = ["std", "sha2"] }
aes-gcm = { version = "~0.10", optional = true, default-features = false, features = ["std", "aes", "rand_core"] }
async-trait = { version = "~0.1", optional = true }
serde = { version = "^1", optional = true, features = ["derive"] }
[profile.dev.package.num-bigint-dig]
opt-level = 3 # Speed up rsa key gen.
[features]
default = ["compress_encryption", "auto_flush", "stream_net"]
__internal_variable_len_reader_with_feature = ["variable-len-reader/sync", "variable-len-reader/std-comp"]
compression = ["dep:flate2", "__internal_variable_len_reader_with_feature"]
encryption = ["dep:rand", "dep:__aead_with_feature", "dep:rsa", "dep:aes-gcm", "__internal_variable_len_reader_with_feature"]
compress_encryption = ["compression", "encryption", "__internal_variable_len_reader_with_feature"]
auto_flush = ["tokio/io-util"]
streams = ["dep:async-trait"]
stream_net = ["streams", "tokio/net"]
serde = ["dep:serde"]
[dev-dependencies]
anyhow = "^1"
tokio = { version = "^1", features = ["macros", "io-util", "net"] }
variable-len-reader = { version = "^3", features = ["full"] }
serde_json = "^1"
criterion = { version = "~0.5", features = ["async_tokio"] }
[[bench]]
name = "protocols"
harness = false
[badges]
maintenance = { status = "passively-maintained" }
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]