aboutsummaryrefslogtreecommitdiff
path: root/net/Cargo.toml
blob: 1a1a34ddadaa5082e416054934bdd5bf0de62145 (plain)
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
[package]
name = "karyon_net"
description = "Internal crate for Karyon library."
version.workspace = true
edition.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
authors.workspace = true

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["smol", "all-protocols"]
all-protocols = ["tcp", "tls", "ws", "udp", "unix"]
stream = ["pin-project-lite", "futures-util"]
tcp = ["stream"]
tls = ["tcp", "karyon_async_rustls", "rustls-pki-types"]
ws = ["tcp", "async-tungstenite"]
udp = []
unix = ["stream"]
smol = [
    "karyon_core/smol",
    "async-tungstenite?/async-std-runtime",
    "karyon_async_rustls?/smol",
]
tokio = [
    "karyon_core/tokio",
    "async-tungstenite?/tokio-runtime",
    "karyon_async_rustls?/tokio",
    "dep:tokio",
]
serde = ["dep:serde"]

[dependencies]
karyon_core = { workspace = true }
karyon_async_rustls = { workspace = true, optional = true }

log = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }
serde = { workspace = true, features = ["derive"], optional = true }
bincode = { workspace = true, features = ["derive"] }

# async
async-trait = { workspace = true }
async-channel = { workspace = true }
futures-util = { workspace = true, features = ["sink"], optional = true }
pin-project-lite = { workspace = true, optional = true }
tokio = { workspace = true, features = ["io-util"], optional = true }

# websocket
async-tungstenite = { workspace = true, optional = true }

# tls
rustls-pki-types = { workspace = true, optional = true }

[dev-dependencies]
smol = { workspace = true }