From 05fd6ef02cf99e565357fe36e225a9b3b83c0967 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 9 Mar 2026 20:10:45 -0400 Subject: [PATCH 1/3] Remove async-std in benchmark in favor of tokio --- .github/workflows/ci.yml | 2 ++ Cargo.toml | 2 +- benches/scheduling.rs | 22 +++++++++++++--------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfcfe65..ad728b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,7 +82,9 @@ jobs: run: | set -e + rustup toolchain install stable --no-self-update --profile=minimal rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal + cargo +stable generate-lockfile rustup override set ${{ env.MSRV }} cargo -V diff --git a/Cargo.toml b/Cargo.toml index 600fa82..692d82b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ slotmap = "1" affinity = "0.1.2" [dev-dependencies] -async-std = "1.6" +tokio = { version = "1", features = ["rt-multi-thread"] } criterion = "0.6" flume = "0.11" futures-executor = "0.3" diff --git a/benches/scheduling.rs b/benches/scheduling.rs index c6952bd..9770e22 100644 --- a/benches/scheduling.rs +++ b/benches/scheduling.rs @@ -16,14 +16,16 @@ pub fn wide(c: &mut Criterion) { group.throughput(Throughput::Elements(count as u64)); - group.bench_function("async-std", |b| { + let rt = tokio::runtime::Runtime::new().unwrap(); + + group.bench_function("tokio", |b| { b.iter_batched( future_creation, |input| { - let handle_vec: Vec<_> = input.into_iter().map(|fut| async_std::task::spawn(fut)).collect(); - futures_executor::block_on(async move { + let handle_vec: Vec<_> = input.into_iter().map(|fut| rt.spawn(fut)).collect(); + rt.block_on(async move { for handle in handle_vec { - handle.await; + handle.await.unwrap(); } }) }, @@ -60,24 +62,26 @@ pub fn chain(c: &mut Criterion) { group.throughput(Throughput::Elements(count as u64)); - group.bench_function("async-std", |b| { + let rt = tokio::runtime::Runtime::new().unwrap(); + + group.bench_function("tokio", |b| { b.iter_batched( || { let receiver = receiver.clone(); - let mut head = async_std::task::spawn(async move { + let mut head = rt.spawn(async move { receiver.recv_async().await.unwrap(); }); for _ in 0..count { let old_head = head; - head = async_std::task::spawn(async move { - old_head.await; + head = rt.spawn(async move { + old_head.await.unwrap(); }); } head }, |input| { sender.send(()).unwrap(); - futures_executor::block_on(input) + rt.block_on(async { input.await.unwrap() }) }, BatchSize::PerIteration, ) From 12a7177b30d143eacf4fded8842a24f6aed86aee Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 9 Mar 2026 20:12:35 -0400 Subject: [PATCH 2/3] Only run CI on trunk --- .github/workflows/ci.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad728b7..1c4349f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,12 +2,7 @@ name: CI on: push: - branches-ignore: [ - # We don't need to run on renovate PRs. - "renovate/**", - # This is the branch the merge queue creates. - "gh-readonly-queue/**", - ] + branches: [trunk] pull_request: env: From 955e6c34f8034182c7c9a60d334c5ed4e1c2c903 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Mon, 9 Mar 2026 20:32:34 -0400 Subject: [PATCH 3/3] Bump MSRV to 1.71 --- .github/workflows/ci.yml | 16 ++++++++++++---- CHANGELOG.md | 5 ++++- Cargo.toml | 2 +- README.md | 3 +-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c4349f..676e0c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ env: RUSTFLAGS: -D warnings RUSTDOCFLAGS: -D warnings CI_RUST_VERSION: "1.85" - MSRV: "1.65" + MSRV: "1.71" jobs: build: @@ -44,6 +44,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install cargo-nextest + uses: taiki-e/install-action@nextest + - name: install rust shell: bash run: | @@ -63,7 +66,7 @@ jobs: - name: test shell: bash if: matrix.name != 'stable wasm' - run: cargo test --all-features --target ${{ matrix.target }} + run: cargo nextest run --all-features --target ${{ matrix.target }} msrv: runs-on: ubuntu-latest @@ -77,12 +80,17 @@ jobs: run: | set -e - rustup toolchain install stable --no-self-update --profile=minimal rustup toolchain install ${{ env.MSRV }} --no-self-update --profile=minimal - cargo +stable generate-lockfile rustup override set ${{ env.MSRV }} cargo -V + - name: downgrade dependencies + run: | + set -e + + # 2.12.0 bumps MSRV to 1.82. + cargo update -p indexmap --precise 2.11.0 + - name: check msrv run: | set -e diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a5417..c731bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,13 @@ and this project adheres to cargo's version of [Semantic Versioning](https://sem ## Unreleased -Released 2025-04-26 +#### Changes +- MSRV updated to `1.71`. ## v0.3.1 +Released 2025-04-26 + #### Changes - Updated dependencies. diff --git a/Cargo.toml b/Cargo.toml index 692d82b..47fbf98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/BVE-Reborn/switchyard" license = "MIT OR Apache-2.0 OR Zlib" keywords = [] categories = [] -rust-version = "1.65" +rust-version = "1.71" [[bench]] name = "scheduling" diff --git a/README.md b/README.md index ab8dd3b..f7a552b 100644 --- a/README.md +++ b/README.md @@ -55,8 +55,7 @@ let yard = Switchyard::new(one_to_one(thread_info(), Some("thread-name")), || Ce yard.spawn_local(0, |data| async move { data.set(10) }); ``` -## MSRV -1.65 +## MSRV71 Future MSRV bumps will be breaking changes.