From a2fee9dd96636867c824343546db6d130da07e23 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Tue, 24 Jun 2025 10:41:08 +0200 Subject: [PATCH 1/3] Update rand crate to 0.9 --- Cargo.lock | 55 +++++++++++++++++++++++++++++++++++++++++++---------- Cargo.toml | 2 +- deny.toml | 11 +++-------- src/uuid.rs | 4 ++-- 4 files changed, 51 insertions(+), 21 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8d2e840..da82b98 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -485,7 +485,19 @@ checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1044,22 +1056,27 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" -version = "0.8.5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ - "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -1067,11 +1084,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom", + "getrandom 0.3.3", ] [[package]] @@ -1310,7 +1327,7 @@ checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", - "getrandom", + "getrandom 0.2.15", "once_cell", "rustix 0.38.43", "windows-sys 0.59.0", @@ -1587,6 +1604,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "which" version = "4.4.2" @@ -1690,6 +1716,15 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + [[package]] name = "zerocopy" version = "0.7.35" diff --git a/Cargo.toml b/Cargo.toml index 56fc833..8ff535b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ bytes = { version = "1.10" } mediatype = "0.19" mockall = { version = "0.13", optional = true } protobuf = { version = "3.7.2", features = ["with-bytes"] } -rand = { version = "0.8.0" } +rand = { version = "0.9" } thiserror = { version = "1.0.69", optional = true } tokio = { version = "1.44", default-features = false, optional = true } tracing = { version = "0.1", default-features = false, features = ["log", "std"] } diff --git a/deny.toml b/deny.toml index 04c0c27..3c1662e 100644 --- a/deny.toml +++ b/deny.toml @@ -18,21 +18,16 @@ [licenses] allow = ["Apache-2.0", "MIT"] private = { ignore = true } -exceptions = [ - { name = "unicode-ident", allow = [ - "Unicode-3.0", - ] }, -] +exceptions = [{ name = "unicode-ident", allow = ["Unicode-3.0"] }] unused-allowed-license = "deny" [bans] multiple-versions = "deny" wildcards = "deny" skip-tree = [ + { crate = "protobuf-codegen", reason = "this is only needed/used during the build process" }, { crate = "windows-sys", reason = "a foundational crate for many that bumps far too frequently to ever have a shared version" }, ] [advisories] -ignore = [ - { id = "RUSTSEC-2025-0023", reason = "this crate does not use tokio::sync::broadcast" } -] +ignore = [{ id = "RUSTSEC-2025-0023", reason = "this crate does not use tokio::sync::broadcast" }] diff --git a/src/uuid.rs b/src/uuid.rs index c4331f8..cfc9f8b 100644 --- a/src/uuid.rs +++ b/src/uuid.rs @@ -132,13 +132,13 @@ impl UUID { // fill upper 48 bits with timestamp let mut msb = (timestamp_millis << 16).to_be_bytes(); // fill remaining bits with random bits - rand::thread_rng().fill_bytes(&mut msb[6..]); + rand::rng().fill_bytes(&mut msb[6..]); // set version (7) msb[6] = msb[6] & 0b00001111 | 0b01110000; let mut lsb = [0u8; 8]; // fill lsb with random bits - rand::thread_rng().fill_bytes(&mut lsb); + rand::rng().fill_bytes(&mut lsb); // set variant (RFC4122) lsb[0] = lsb[0] & 0b00111111 | 0b10000000; Self::from_bytes_unchecked(msb, lsb) From b50bd3bb98372ad7ad0afa255e2d7cdd3da80fb0 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Tue, 24 Jun 2025 10:46:54 +0200 Subject: [PATCH 2/3] Update mediatype crate to 0.20 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index da82b98..ecb7251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -721,9 +721,9 @@ checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "mediatype" -version = "0.19.20" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33746aadcb41349ec291e7f2f0a3aa6834d1d7c58066fb4b01f68efc4c4b7631" +checksum = "f490ea2ae935dd8ac89c472d4df28c7f6b87cc20767e1b21fd5ed6a16e7f61e4" [[package]] name = "memchr" diff --git a/Cargo.toml b/Cargo.toml index 8ff535b..2419612 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ test-util = ["mockall"] [dependencies] async-trait = { version = "0.1" } bytes = { version = "1.10" } -mediatype = "0.19" +mediatype = "0.20" mockall = { version = "0.13", optional = true } protobuf = { version = "3.7.2", features = ["with-bytes"] } rand = { version = "0.9" } From 7f93082d202e9ca4e2ea8951e3660e1cbcc0ae69 Mon Sep 17 00:00:00 2001 From: Kai Hudalla Date: Tue, 24 Jun 2025 11:18:09 +0200 Subject: [PATCH 3/3] Use specific versions of dev dependencies Dev dependencies have been updated to specific versions to ensure consistency across builds. --- Cargo.lock | 4 ++-- Cargo.toml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ecb7251..e079c53 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1446,9 +1446,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.44.0" +version = "1.45.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" +checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" dependencies = [ "backtrace", "pin-project-lite", diff --git a/Cargo.toml b/Cargo.toml index 2419612..3610ce1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,10 +62,10 @@ protoc-bin-vendored = { version = "3.1" } [dev-dependencies] clap = { version = "4.5.40" } cucumber = { version = "0.21.1", features = ["output-junit"] } -hex = { version = "0.4" } -mockall = { version = "0.13" } -test-case = { version = "3.3" } -tokio = { version = "1.44", default-features = false, features = [ +hex = { version = "0.4.3" } +mockall = { version = "0.13.1" } +test-case = { version = "3.3.1" } +tokio = { version = "1.44.2", default-features = false, features = [ "macros", "rt", "rt-multi-thread",