aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/Cargo.toml
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-05-20 00:14:15 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-20 00:14:15 +0200
commit059eed6ffa3a0ade449dfc5f5a7a97699e24394e (patch)
treed2139467f62574d845340eb80a6cd8161ceb261f /jsonrpc/Cargo.toml
parent82564d3d8626d87a458888048a1e525efaad09bc (diff)
jsonrpc: add ws cargo features
Diffstat (limited to 'jsonrpc/Cargo.toml')
-rw-r--r--jsonrpc/Cargo.toml15
1 files changed, 8 insertions, 7 deletions
diff --git a/jsonrpc/Cargo.toml b/jsonrpc/Cargo.toml
index 719543e..ffab8bf 100644
--- a/jsonrpc/Cargo.toml
+++ b/jsonrpc/Cargo.toml
@@ -5,40 +5,41 @@ edition.workspace = true
[features]
default = ["smol"]
+ws = ["karyon_net/ws", "async-tungstenite"]
+unix = ["karyon_net/ws"]
smol = [
"karyon_core/smol",
"karyon_net/smol",
"karyon_jsonrpc_macro/smol",
- "dep:futures-rustls",
- "async-tungstenite/async-std-runtime",
+ "futures-rustls",
+ "async-tungstenite?/async-std-runtime",
]
tokio = [
"karyon_core/tokio",
"karyon_net/tokio",
"karyon_jsonrpc_macro/tokio",
- "async-tungstenite/tokio-runtime",
- "dep:tokio-rustls",
+ "tokio-rustls",
+ "async-tungstenite?/tokio-runtime",
]
[dependencies]
karyon_core = { workspace = true, default-features = false }
karyon_net = { workspace = true, default-features = false, features = [
"tcp",
- "unix",
"tls",
- "ws",
] }
karyon_jsonrpc_macro = { path = "jsonrpc_macro", default-features = false }
log = "0.4.21"
rand = "0.8.5"
-async-tungstenite = { version = "0.25.0", default-features = false }
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
thiserror = "1.0.58"
async-trait = "0.1.77"
+async-tungstenite = { version = "0.25.0", default-features = false, optional = true }
+
futures-rustls = { version = "0.25.1", optional = true }
tokio-rustls = { version = "0.26.0", optional = true }