Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hozan23 committed Jun 24, 2024
1 parent f3bb855 commit 1a3ef2d
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 272 deletions.
383 changes: 171 additions & 212 deletions Cargo.lock

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ tokio = ["dep:tokio"]
smol = ["dep:smol", "dep:async-process"]

[dependencies]
pin-project-lite = "0.2.13"
log = "0.4.21"
bincode = "2.0.0-rc.3"
chrono = "0.4.35"
thiserror = "1.0.61"
chrono = "0.4.38"
rand = "0.8.5"
thiserror = "1.0.58"
dirs = "5.0.1"
async-channel = "2.2.0"

# crypto feature deps
ed25519-dalek = { version = "2.1.1", features = ["rand_core"], optional = true }
parking_lot = "0.12.3"
once_cell = "1.19.0"

# smol feature deps
async-process = { version = "2.1.0", optional = true }
# async
async-channel = "2.3.1"
pin-project-lite = "0.2.14"
async-process = { version = "2.2.3", optional = true }
smol = { version = "2.0.0", optional = true }
tokio = { version = "1.38.0", features = ["full"], optional = true }

# tokio feature deps
tokio = { version = "1.37.0", features = ["full"], optional = true }
once_cell = "1.19.0"
parking_lot = "0.12.2"
# encode
bincode = "2.0.0-rc.3"

# crypto
ed25519-dalek = { version = "2.1.1", features = ["rand_core"], optional = true }
15 changes: 10 additions & 5 deletions jsonrpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,18 @@ karyon_jsonrpc_macro = { version = "0.1.4", path = "jsonrpc_macro", default-feat

log = "0.4.21"
rand = "0.8.5"
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
thiserror = "1.0.58"
async-trait = "0.1.77"
thiserror = "1.0.61"

# encode/decode
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"

# async
async-trait = "0.1.80"
async-channel = "2.3.1"

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

[dev-dependencies]
env_logger = "0.11.3"
Expand Down
4 changes: 2 additions & 2 deletions jsonrpc/examples/tokio_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ edition = "2021"
[dependencies]
env_logger = "0.11.3"
karyon_jsonrpc = { path = "../../", default-features = false, features = ["tokio", "ws"] }
serde = { version = "1.0.202", features = ["derive"] }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
tokio = { version = "1.37.0", features = ["full"] }
tokio = { version = "1.38.0", features = ["full"] }

[profile.release]
debug = true
Expand Down
4 changes: 2 additions & 2 deletions jsonrpc/jsonrpc_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ tokio = []
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0", features = ["full"] }
syn = { version = "2.0", features = ["full"] }

serde_json = "1.0.114"
serde_json = "1.0.117"
4 changes: 2 additions & 2 deletions jsonrpc/jsonrpc_macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn rpc_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {

for item in parsed_input.items {
match item {
ImplItem::Method(method) => {
ImplItem::Fn(method) => {
methods.push(method.sig.ident);
}
_ => err!(item.span(), "unexpected item"),
Expand Down Expand Up @@ -68,7 +68,7 @@ pub fn rpc_pubsub_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {

for item in parsed_input.items {
match item {
ImplItem::Method(method) => {
ImplItem::Fn(method) => {
methods.push(method.sig.ident);
}
_ => err!(item.span(), "unexpected item"),
Expand Down
29 changes: 13 additions & 16 deletions net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,28 @@ serde = ["dep:serde"]
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 }

# utils
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"] }
thiserror = "1.0.58"
url = "2.5.0"

# async utils
async-trait = "0.1.77"
async-channel = "2.3.0"
# 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.13", optional = true }
pin-project-lite = { version = "0.2.14", optional = true }
tokio = { version = "1.38.0", features = ["io-util"], optional = true }

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

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

# tokio util
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"
2 changes: 1 addition & 1 deletion net/async_rustls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ smol = ["futures-rustls"]
tokio = ["tokio-rustls"]

[dependencies]
futures-rustls = { version = "0.25.1", optional = true }
futures-rustls = { version = "0.26.0", optional = true }
tokio-rustls = { version = "0.26.0", optional = true }

2 changes: 1 addition & 1 deletion net/examples/tcp_codec_tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
[dependencies]
karyon_net = { path = "../../", default-features = false, features = ["tokio", "tcp"] }
karyon_core = { path = "../../../core", default-features = false, features = ["tokio"] }
tokio = { version = "1.37.0", features = ["full"] }
tokio = { version = "1.38.0", features = ["full"] }

20 changes: 10 additions & 10 deletions p2p/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ karyon_net = { workspace = true, default-features = false, features = [


log = "0.4.21"
chrono = "0.4.35"
chrono = "0.4.38"
rand = "0.8.5"
thiserror = "1.0.58"
semver = "1.0.22"
thiserror = "1.0.61"
semver = "1.0.23"
sha2 = "0.10.8"
parking_lot = "0.12.2"
parking_lot = "0.12.3"

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

# async
async-trait = "0.1.77"
async-channel = "2.3.0"
async-trait = "0.1.80"
async-channel = "2.3.1"
futures-util = { version = "0.3.5", features = [
"alloc",
], default-features = false }

# tls
rcgen = "0.12.1"
rcgen = "0.13.1"
yasna = "0.5.2"
x509-parser = "0.16.0"
futures-rustls = { version = "0.25.1", features = [
futures-rustls = { version = "0.26.0", features = [
"aws-lc-rs",
], optional = true }
tokio-rustls = { version = "0.26.0", features = ["aws-lc-rs"], optional = true }
rustls-pki-types = "1.7.0"

[dev-dependencies]
async-std = "1.12.0"
clap = { version = "4.5.2", features = ["derive"] }
clap = { version = "4.5.7", features = ["derive"] }
ctrlc = "3.4.4"
easy-parallel = "3.3.1"
env_logger = "0.11.3"
Expand Down
4 changes: 2 additions & 2 deletions p2p/examples/tokio-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
[dependencies]
karyon_p2p = { path = "../../", default-features = false, features = ["tokio"] }
async-channel = "2.3.1"
tokio = { version = "1.37.0", features = ["full"] }
clap = { version = "4.5.4", features = ["derive"] }
tokio = { version = "1.38.0", features = ["full"] }
clap = { version = "4.5.7", features = ["derive"] }
ctrlc = "3.4.4"
env_logger = "0.11.3"
8 changes: 3 additions & 5 deletions p2p/src/tls_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ pub fn tls_server_config(key_pair: &KeyPair) -> Result<rustls::ServerConfig> {

/// Generates a certificate and returns both the certificate and the private key.
fn generate_cert<'a>(key_pair: &KeyPair) -> Result<(CertificateDer<'a>, PrivateKeyDer<'a>)> {
let cert_key_pair = rcgen::KeyPair::generate(&rcgen::PKCS_ED25519)?;
let cert_key_pair = rcgen::KeyPair::generate_for(&rcgen::PKCS_ED25519)?;
let private_key = PrivateKeyDer::Pkcs8(cert_key_pair.serialize_der().into());

// Add a custom extension to the certificate:
Expand All @@ -94,12 +94,10 @@ fn generate_cert<'a>(key_pair: &KeyPair) -> Result<(CertificateDer<'a>, PrivateK
let mut ext = rcgen::CustomExtension::from_oid_content(&[0, 0, 0, 0], ext_content);
ext.set_criticality(true);

let mut params = rcgen::CertificateParams::new(vec![]);
params.alg = &rcgen::PKCS_ED25519;
params.key_pair = Some(cert_key_pair);
let mut params = rcgen::CertificateParams::new(vec![])?;
params.custom_extensions.push(ext);

let cert = CertificateDer::from(rcgen::Certificate::from_params(params)?.serialize_der()?);
let cert = CertificateDer::from(params.self_signed(&cert_key_pair)?);
Ok((cert, private_key))
}

Expand Down

0 comments on commit 1a3ef2d

Please sign in to comment.