aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc/Cargo.toml
diff options
context:
space:
mode:
authorhozan23 <hozan23@karyontech.net>2024-04-11 10:19:20 +0200
committerhozan23 <hozan23@karyontech.net>2024-05-19 13:51:30 +0200
commit0992071a7f1a36424bcfaf1fbc84541ea041df1a (patch)
tree961d73218af672797d49f899289bef295bc56493 /jsonrpc/Cargo.toml
parenta69917ecd8272a4946cfd12c75bf8f8c075b0e50 (diff)
add support for tokio & improve net crate api
Diffstat (limited to 'jsonrpc/Cargo.toml')
-rw-r--r--jsonrpc/Cargo.toml45
1 files changed, 33 insertions, 12 deletions
diff --git a/jsonrpc/Cargo.toml b/jsonrpc/Cargo.toml
index 73ae275..e81ec10 100644
--- a/jsonrpc/Cargo.toml
+++ b/jsonrpc/Cargo.toml
@@ -1,28 +1,49 @@
[package]
name = "karyon_jsonrpc"
-version.workspace = true
+version.workspace = true
edition.workspace = true
-autoexamples = false
+
+[features]
+default = ["smol"]
+smol = [
+ "karyon_core/smol",
+ "karyon_net/smol",
+ "karyon_jsonrpc_internal/smol",
+ "karyon_jsonrpc_macro/smol",
+ "dep:futures-rustls",
+ "async-tungstenite/async-std-runtime",
+]
+tokio = [
+ "karyon_core/tokio",
+ "karyon_net/tokio",
+ "karyon_jsonrpc_internal/tokio",
+ "karyon_jsonrpc_macro/tokio",
+ "async-tungstenite/tokio-runtime",
+ "dep:tokio-rustls",
+]
[dependencies]
-karyon_core.workspace = true
-karyon_net.workspace = true
+karyon_core = { workspace = true, default-features = false }
+karyon_net = { workspace = true, default-features = false }
+
+karyon_jsonrpc_macro = { path = "jsonrpc_macro", default-features = false }
+karyon_jsonrpc_internal = { path = "jsonrpc_internal", default-features = false }
-smol = "2.0.0"
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"
memchr = "2.7.1"
+async-trait = "0.1.77"
-[[example]]
-name = "server"
-path = "examples/server.rs"
-
-[[example]]
-name = "client"
-path = "examples/client.rs"
+futures-rustls = { version = "0.25.1", optional = true }
+tokio-rustls = { version = "0.26.0", optional = true }
[dev-dependencies]
env_logger = "0.11.3"
+rcgen = "0.13.1"
+rustls-pemfile = "2.1.2"
+smol = "2.0.0"
+webpki-roots = "0.26.1"