Skip to content

Commit

Permalink
Merge pull request #217 from greatest-ape/work-2025-01-12
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
greatest-ape authored Jan 12, 2025
2 parents 289ba02 + bad010d commit 0157ce5
Show file tree
Hide file tree
Showing 16 changed files with 584 additions and 735 deletions.
1,243 changes: 543 additions & 700 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## High priority

* update zerocopy version (will likely require minor rewrite)

* udp (uring)
* run tests under valgrind
* hangs for integration tests, possibly related to https://bugs.kde.org/show_bug.cgi?id=463859
Expand Down
2 changes: 1 addition & 1 deletion crates/bencher/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ clap = { version = "4", features = ["derive"] }
humanize-bytes = "1"
indexmap = "2"
indoc = "2"
itertools = "0.12"
itertools = "0.14"
num-format = "0.4"
nonblock = "0.2"
once_cell = "1"
Expand Down
10 changes: 5 additions & 5 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ aquatic_toml_config.workspace = true
ahash = "0.8"
anyhow = "1"
arc-swap = "1"
duplicate = "1"
duplicate = "2"
git-testament = "0.2"
hashbrown = "0.14"
hashbrown = "0.15"
hex = "0.4"
indexmap = "2"
libc = "0.2"
Expand All @@ -42,9 +42,9 @@ rustls = { version = "0.23", optional = true }
rustls-pemfile = { version = "2", optional = true }

# prometheus feature
metrics = { version = "0.22", optional = true }
metrics-util = { version = "0.16", optional = true }
metrics-exporter-prometheus = { version = "0.14", optional = true, default-features = false, features = ["http-listener"] }
metrics = { version = "0.24", optional = true }
metrics-util = { version = "0.19", optional = true }
metrics-exporter-prometheus = { version = "0.16", optional = true, default-features = false, features = ["http-listener"] }
tokio = { version = "1", optional = true, features = ["rt", "net", "time"] }

# cpu pinning feature
Expand Down
4 changes: 3 additions & 1 deletion crates/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ pub fn spawn_prometheus_endpoint(
}
});

exporter.await.context("run prometheus exporter")
exporter
.await
.map_err(|err| anyhow::anyhow!("run prometheus exporter: :{:#?}", err))
})
})
.context("spawn prometheus endpoint")?;
Expand Down
6 changes: 3 additions & 3 deletions crates/http/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ serde = { version = "1", features = ["derive"] }
signal-hook = { version = "0.3" }
slotmap = "1"
socket2 = { version = "0.5", features = ["all"] }
thiserror = "1"
thiserror = "2"

# metrics feature
metrics = { version = "0.22", optional = true }
metrics-util = { version = "0.16", optional = true }
metrics = { version = "0.24", optional = true }
metrics-util = { version = "0.19", optional = true }

# mimalloc feature
mimalloc = { version = "0.1", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/http/src/workers/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub async fn run_socket_worker(
request_senders,
opt_tls_config,
connection_handles,
valid_until,
valid_until
)
async move {
#[cfg(feature = "metrics")]
Expand Down
2 changes: 1 addition & 1 deletion crates/http_load_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ anyhow = "1"
futures = "0.3"
futures-lite = "1"
futures-rustls = "0.26"
hashbrown = "0.14"
hashbrown = "0.15"
glommio = "0.9"
log = "0.4"
mimalloc = { version = "0.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/peer_id/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name = "aquatic_peer_id"
default = ["quickcheck"]

[dependencies]
compact_str = "0.7"
compact_str = "0.8"
hex = "0.4"
regex = "1"
serde = { version = "1", features = ["derive"] }
Expand Down
10 changes: 5 additions & 5 deletions crates/udp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ anyhow = "1"
arrayvec = "0.7"
blake3 = "1"
cfg-if = "1"
compact_str = "0.7"
compact_str = "0.8"
constant_time_eq = "0.3"
crossbeam-channel = "0.5"
crossbeam-utils = "0.8"
getrandom = "0.2"
hashbrown = { version = "0.14", default-features = false }
hashbrown = { version = "0.15", default-features = false }
hdrhistogram = "7"
hex = "0.4"
libc = "0.2"
log = "0.4"
mio = { version = "0.8", features = ["net", "os-poll"] }
mio = { version = "1", features = ["net", "os-poll"] }
num-format = "0.4"
parking_lot = "0.12"
rand = { version = "0.8", features = ["small_rng"] }
Expand All @@ -59,10 +59,10 @@ time = { version = "0.3", features = ["formatting"] }
tinytemplate = "1"

# prometheus feature
metrics = { version = "0.22", optional = true }
metrics = { version = "0.24", optional = true }

# io-uring feature
io-uring = { version = "0.6", optional = true }
io-uring = { version = "0.7", optional = true }

# mimalloc feature
mimalloc = { version = "0.1", default-features = false, optional = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/udp_load_test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
let state = state.clone();
let statistics_sender = statistics_sender.clone();

Builder::new().name("load-test".into()).spawn(move || {
Worker::run(config, state, statistics_sender, peers, addr)
})?;
Builder::new()
.name("load-test".into())
.spawn(move || Worker::run(config, state, statistics_sender, peers, addr))?;
}

monitor_statistics(state, &config, statistics_receiver);
Expand Down
10 changes: 5 additions & 5 deletions crates/ws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ aquatic_toml_config.workspace = true
aquatic_ws_protocol.workspace = true

anyhow = "1"
async-tungstenite = "0.25"
async-tungstenite = "0.28"
arc-swap = "1"
cfg-if = "1"
futures = "0.3"
futures-lite = "1"
futures-rustls = "0.26"
glommio = "0.9"
hashbrown = { version = "0.14", features = ["serde"] }
hashbrown = { version = "0.15", features = ["serde"] }
httparse = "1"
indexmap = "2"
log = "0.4"
Expand All @@ -53,11 +53,11 @@ signal-hook = { version = "0.3" }
slab = "0.4"
slotmap = "1"
socket2 = { version = "0.5", features = ["all"] }
tungstenite = "0.21"
tungstenite = "0.24"

# metrics feature
metrics = { version = "0.22", optional = true }
metrics-util = { version = "0.16", optional = true }
metrics = { version = "0.24", optional = true }
metrics-util = { version = "0.19", optional = true }

# mimalloc feature
mimalloc = { version = "0.1", default-features = false, optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/ws_load_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ aquatic_toml_config.workspace = true
aquatic_ws_protocol.workspace = true

anyhow = "1"
async-tungstenite = "0.25"
async-tungstenite = "0.28"
futures = "0.3"
futures-rustls = "0.26"
glommio = "0.9"
Expand All @@ -31,7 +31,7 @@ rand_distr = "0.4"
rustls = { version = "0.23" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tungstenite = "0.21"
tungstenite = "0.24"

[dev-dependencies]
quickcheck = "1"
Expand Down
6 changes: 3 additions & 3 deletions crates/ws_protocol/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ harness = false

[dependencies]
anyhow = "1"
hashbrown = { version = "0.14", features = ["serde"] }
hashbrown = { version = "0.15", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
simd-json = "0.13"
tungstenite = { version = "0.21", optional = true }
simd-json = "0.14"
tungstenite = { version = "0.24", optional = true }

[dev-dependencies]
criterion = "0.5"
Expand Down
6 changes: 4 additions & 2 deletions crates/ws_protocol/src/incoming/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ impl InMessage {

match ws_message {
Message::Text(text) => {
let mut text: Vec<u8> = text.into();
let mut text: Vec<u8> = text.as_bytes().to_owned();

::simd_json::serde::from_slice(&mut text).context("deserialize with serde")
}
Message::Binary(mut bytes) => {
Message::Binary(bytes) => {
let mut bytes = bytes.to_vec();

::simd_json::serde::from_slice(&mut bytes[..]).context("deserialize with serde")
}
_ => Err(anyhow::anyhow!("Message is neither text nor binary")),
Expand Down
4 changes: 2 additions & 2 deletions crates/ws_protocol/src/outgoing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ impl OutMessage {
use tungstenite::Message::{Binary, Text};

let mut text: Vec<u8> = match message {
Text(text) => text.into(),
Binary(bytes) => String::from_utf8(bytes)?.into(),
Text(text) => text.as_bytes().to_owned(),
Binary(bytes) => String::from_utf8(bytes.to_vec())?.into(),
_ => return Err(anyhow::anyhow!("Message is neither text nor bytes")),
};

Expand Down

0 comments on commit 0157ce5

Please sign in to comment.