aboutsummaryrefslogtreecommitdiff
path: root/net/Cargo.toml
blob: 629918b188cfb340175f35a9a78f3fee284fe8b8 (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
64
65
66
[package]
name = "karyon_net"
description = "Internal crate for Karyon project."
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 = ["dep:pin-project-lite", "dep:futures-util"]
tcp = ["stream"]
tls = ["dep:rustls-pki-types", "tcp"]
ws = ["dep:async-tungstenite", "tcp"]
udp = []
unix = ["stream"]
smol = [
  "karyon_core/smol",
  "async-tungstenite?/async-std-runtime",
  # TODO: use tls feature 
  "futures-rustls",
]
tokio = [
  "karyon_core/tokio",
  "async-tungstenite?/tokio-runtime",
  "dep:tokio",
  # TODO: use tls feature 
  "tokio-rustls",
]
serde = ["dep:serde"]


[dependencies]
karyon_core = { version = "0.1.3", path = "../core", default-features = false }

async-trait = "0.1.77"
log = "0.4.21"
bincode = { version = "2.0.0-rc.3", features = ["derive"] }
thiserror = "1.0.58"
url = "2.5.0"
async-channel = "2.3.0"

futures-util = { version = "0.3.30", default-features = false, features = [
  "sink",
], optional = true }
pin-project-lite = { version = "0.2.13", optional = true }

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

# tls deps
rustls-pki-types = { version = "1.7.0", optional = true }
futures-rustls = { version = "0.25.1", optional = true }
tokio-rustls = { version = "0.26.0", optional = true }
tokio = { version = "1.37.0", features = ["io-util"], optional = true }

# serde
serde = { version = "1.0.197", features = ["derive"], optional = true }

[dev-dependencies]
smol = "2.0.0"