From 059eed6ffa3a0ade449dfc5f5a7a97699e24394e Mon Sep 17 00:00:00 2001 From: hozan23 Date: Mon, 20 May 2024 00:14:15 +0200 Subject: jsonrpc: add ws cargo features --- jsonrpc/Cargo.toml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'jsonrpc/Cargo.toml') 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 } -- cgit v1.2.3