From aa0b922a5f051ed5a2106ba1319ef791313ae82a Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Tue, 23 Dec 2025 08:42:25 +0100 Subject: [PATCH 1/2] fix: remove rust-toolchain.toml to avoid forcing toolchain on all developers PR #814 added rust-toolchain.toml for Nix flake support, but this file affects all developers using rustup, not just Nix users. The pinned version (1.91) is outdated and conflicts with CI which tests against stable/beta/nightly. This change: - Removes rust-toolchain.toml - Updates flake.nix to specify stable Rust directly using rust-overlay - Keeps Nix-specific config in Nix files without affecting other devs --- flake.nix | 4 +++- rust-toolchain.toml | 10 ---------- 2 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 rust-toolchain.toml diff --git a/flake.nix b/flake.nix index af08aa64..40775e2a 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,9 @@ inputs: inputs.utils.lib.eachDefaultSystem ( system: let pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.rust-overlay.overlays.default; - rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; + rust = pkgs.rust-bin.stable.latest.default.override { + extensions = [ "rust-src" "rust-analyzer" ]; + }; in { devShell = pkgs.mkShell { nativeBuildInputs = with pkgs; [ diff --git a/rust-toolchain.toml b/rust-toolchain.toml deleted file mode 100644 index b3d725d7..00000000 --- a/rust-toolchain.toml +++ /dev/null @@ -1,10 +0,0 @@ -[toolchain] -channel = "1.91" -components = [ - "rustc", - "cargo", - "clippy", - "rustfmt", - "rust-analyzer", - "rust-src", -] From d7db156659aecc683e0a14fd373811d9accceb60 Mon Sep 17 00:00:00 2001 From: Roderick van Domburg Date: Thu, 22 Jan 2026 22:49:56 +0100 Subject: [PATCH 2/2] chore: pin MSRV to 1.87 --- .github/workflows/ci.yml | 15 ++++++++------- Cargo.toml | 1 + README.md | 4 ++++ flake.nix | 2 +- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db9e4e8b..3eab8233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,12 +14,11 @@ jobs: tests: name: Tests runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.toolchain == 'nightly' }} strategy: fail-fast: false matrix: os: [macos-latest, windows-latest, ubuntu-latest] - toolchain: [stable, beta, nightly] + toolchain: ["1.87"] include: - os: macos-latest MACOS: true @@ -35,15 +34,17 @@ jobs: - name: Install ${{ matrix.toolchain }} toolchain run: rustup toolchain install ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - - run: | - rustup component add clippy - cargo clippy --all-features -- -D warnings - if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' + - name: Install stable toolchain for clippy + run: rustup toolchain install stable + if: matrix.os == 'ubuntu-latest' + + - run: cargo +stable clippy --all-features -- -D warnings + if: matrix.os == 'ubuntu-latest' - run: | rustup component add rustfmt cargo fmt --all -- --check - if: matrix.toolchain == 'stable' && matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-latest' - run: cargo test --all-targets - run: cargo test --all-targets --all-features diff --git a/Cargo.toml b/Cargo.toml index be347fc8..e6eaff19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/RustAudio/rodio" documentation = "https://docs.rs/rodio" exclude = ["assets/**", "tests/**"] edition = "2021" +rust-version = "1.87" [features] # Default feature set provides audio playback and common format support diff --git a/README.md b/README.md index a2815f99..527b707e 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,10 @@ Rodio playback works in environments supported by [cpal](https://github.com/Rust The CPU of the target system should have hardware support for 32-bit floating point (`f32`), and atomic operations that are at least 32 bit wide. Without these the CPU may not be fast enough to keep up with real-time. +### Minimum Supported Rust Version (MSRV) + +Rodio requires Rust 1.87 or later. + ## Dependencies (Linux only) Rodio uses `cpal` library to send audio to the OS for playback. ALSA development files are needed to build `cpal` on Linux. These are provided as part of the `libasound2-dev` package on Debian and Ubuntu distributions and `alsa-lib-devel` on Fedora. diff --git a/flake.nix b/flake.nix index 40775e2a..933e1e4a 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs: inputs.utils.lib.eachDefaultSystem ( system: let pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.rust-overlay.overlays.default; - rust = pkgs.rust-bin.stable.latest.default.override { + rust = pkgs.rust-bin.stable."1.87.0".default.override { extensions = [ "rust-src" "rust-analyzer" ]; }; in {