From 1011fa2bbd7de2a85c66466c168dd309171afd35 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sat, 23 May 2026 21:30:09 +0200 Subject: [PATCH 1/2] deps: bump criterion 0.5 -> 0.8 and switch to std::hint::black_box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dependabot opened #10 to bump criterion from 0.5.1 to 0.8.2 but the straight version bump fails to build: criterion::black_box was deprecated in 0.6 and removed/marked deny-warn in 0.8, so the existing `use criterion::{black_box, ...}` produces error: use of deprecated function `criterion::black_box`: use `std::hint::black_box()` instead across every bench callsite. Switch the import to std::hint::black_box (stable since Rust 1.66, well under our MSRV of 1.85) and drop the criterion re-export. This supersedes #10 — same target version, plus the code change Dependabot can't make on its own. Verified locally: cargo bench -p wickra --no-run # builds clean cargo clippy --workspace --all-targets --all-features -- -D warnings cargo test --workspace # 630 passed / 0 failed --- Cargo.lock | 75 +++++++++++++++++++---------- Cargo.toml | 2 +- crates/wickra/benches/indicators.rs | 3 +- 3 files changed, 52 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5439353f..f0789c79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,6 +11,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloca" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4" +dependencies = [ + "cc", +] + [[package]] name = "anes" version = "0.1.6" @@ -223,25 +232,24 @@ dependencies = [ [[package]] name = "criterion" -version = "0.5.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" +checksum = "950046b2aa2492f9a536f5f4f9a3de7b9e2476e575e05bd6c333371add4d98f3" dependencies = [ + "alloca", "anes", "cast", "ciborium", "clap", "criterion-plot", - "is-terminal", "itertools", "num-traits", - "once_cell", "oorandom", + "page_size", "plotters", "rayon", "regex", "serde", - "serde_derive", "serde_json", "tinytemplate", "walkdir", @@ -249,9 +257,9 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.5.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" +checksum = "d8d80a2f4f5b554395e47b5d8305bc3d27813bacb73493eb1001e8f76dae29ea" dependencies = [ "cast", "itertools", @@ -547,12 +555,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" - [[package]] name = "http" version = "1.4.0" @@ -690,22 +692,11 @@ dependencies = [ "serde_core", ] -[[package]] -name = "is-terminal" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1008,6 +999,16 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -2019,6 +2020,22 @@ dependencies = [ "wickra-core", ] +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -2028,6 +2045,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-link" version = "0.2.1" diff --git a/Cargo.toml b/Cargo.toml index f6a49afe..543eb98b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ rayon = "1.10" # Testing proptest = "1.5" approx = "0.5" -criterion = { version = "0.5", features = ["html_reports"] } +criterion = { version = "0.8", features = ["html_reports"] } # Python binding pyo3 = { version = "0.28", features = ["extension-module", "abi3-py39"] } diff --git a/crates/wickra/benches/indicators.rs b/crates/wickra/benches/indicators.rs index 748ed93b..09413680 100644 --- a/crates/wickra/benches/indicators.rs +++ b/crates/wickra/benches/indicators.rs @@ -16,7 +16,8 @@ //! cargo run -p wickra-examples --bin fetch_btcusdt //! ``` -use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; +use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion, Throughput}; +use std::hint::black_box; use wickra::{ Atr, BatchExt, BollingerBands, Candle, Ema, Indicator, MacdIndicator, Obv, Rsi, Sma, Stochastic, Wma, From ed576325760d142656c97f4b0525a74c75b8e559 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sat, 23 May 2026 21:36:56 +0200 Subject: [PATCH 2/2] build: lift workspace MSRV to 1.86 to satisfy criterion 0.8.2 criterion 0.8.2 raised its MSRV from 1.85 to 1.86 (rustc 1.85.1 is now explicitly rejected by its Cargo.toml `rust-version`). One more notch on the same upward drift that already took us from 1.75 -> 1.80 (rayon) -> 1.85 (clap_lex/edition2024). Updated: - Cargo.toml workspace rust-version 1.85 -> 1.86 - .github/workflows/ci.yml MSRV matrix name + toolchain - ci.yml comment refreshed to reflect the new driving dep --- .github/workflows/ci.yml | 16 ++++++++-------- Cargo.toml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eba69bb1..881bb63d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,12 +56,12 @@ jobs: run: cargo build -p wickra-examples --bins # Verify the crates still build and test on their declared minimum supported - # Rust version. The workspace pins rust-version = "1.85" — that floor is - # set by clap_lex 1.1.0 (transitively pulled in by the criterion dev-dep) - # which needs the stabilized edition2024 feature (stable since Rust 1.85); - # rayon-core 1.13.0 only needed 1.80 and is subsumed by the 1.85 floor. - # bindings/node pins rust-version = "1.88" because napi-build 2.3.2 - # requires it (and that subsumes the older 1.77 floor needed for + # Rust version. The workspace pins rust-version = "1.86" — that floor is + # set by criterion 0.8.2 (the bench dev-dep), which itself rolled past the + # clap_lex 1.1.0 / edition2024 / Rust 1.85 floor and now needs 1.86; the + # earlier rayon-core 1.13.0 (1.80) and clap_lex (1.85) requirements are + # subsumed. bindings/node pins rust-version = "1.88" because napi-build + # 2.3.2 requires it (and that subsumes the older 1.77 floor needed for # `cargo::` directives). Without this job an accidental use of a newer # API would only surface for downstream users. msrv: @@ -71,8 +71,8 @@ jobs: fail-fast: false matrix: include: - - name: MSRV workspace (Rust 1.85) - toolchain: "1.85" + - name: MSRV workspace (Rust 1.86) + toolchain: "1.86" packages: "-p wickra-core -p wickra -p wickra-data" - name: MSRV node binding (Rust 1.88) toolchain: "1.88" diff --git a/Cargo.toml b/Cargo.toml index 543eb98b..8318cdae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ exclude = ["fuzz"] version = "0.2.0" authors = ["kingchenc "] edition = "2021" -rust-version = "1.85" +rust-version = "1.86" license = "PolyForm-Noncommercial-1.0.0" repository = "https://github.com/kingchenc/wickra" homepage = "https://github.com/kingchenc/wickra"