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 af08aa64..933e1e4a 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."1.87.0".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", -]