aboutsummaryrefslogtreecommitdiff
path: root/net/Cargo.toml
blob: 8fd387f650fd7b4bc3514a23b1e06841e20acc40 (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
60
61
62
63
[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 = { version = "0.1.4", path = "../core", default-features = false }
karyon_async_rustls = { version = "0.1.4", path = "./async_rustls", default-features = false, optional = true }

log = "0.4.21"
thiserror = "1.0.61"
url = "2.5.2"

# encode/decode 
serde = { version = "1.0.203", features = ["derive"], optional = true }
bincode = { version = "2.0.0-rc.3", features = ["derive"] }

# async
async-trait = "0.1.80"
async-channel = "2.3.1"
futures-util = { version = "0.3.30", default-features = false, features = [
  "sink",
], optional = true }
pin-project-lite = { version = "0.2.14", optional = true }
tokio = { version = "1.38.0", features = ["io-util"], optional = true }

# websocket
async-tungstenite = { version = "0.26.2", default-features = false, optional = true }

# tls
rustls-pki-types = { version = "1.7.0", optional = true }

[dev-dependencies]
smol = "2.0.0"