diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee19abd8..7eede1ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -345,6 +345,9 @@ jobs: testcfail: name: testcfail runs-on: ubuntu-latest + env: + RUSTFLAGS: -D warnings + MSRV: 1.87.0 defaults: run: working-directory: cfail @@ -374,7 +377,9 @@ jobs: ${{ runner.OS }}-build- - name: Install Rust - uses: dtolnay/rust-toolchain@stable + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.MSRV }} - name: Run cargo run: cargo run diff --git a/CHANGELOG.md b/CHANGELOG.md index a0932a62..23e59a81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- Make MSRV of 1.87.0 explicit. + ## [v0.9.1] - 2025-08-19 ### Added @@ -701,7 +703,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Initial release [Unreleased]: https://github.com/rust-embedded/heapless/compare/v0.9.1...HEAD -[v0.9.0]: https://github.com/rust-embedded/heapless/compare/v0.9.0...v0.9.1 +[v0.9.1]: https://github.com/rust-embedded/heapless/compare/v0.9.0...v0.9.1 [v0.9.0]: https://github.com/rust-embedded/heapless/compare/v0.8.0...v0.9.0 [v0.8.0]: https://github.com/rust-embedded/heapless/compare/v0.7.16...v0.8.0 [v0.7.16]: https://github.com/rust-embedded/heapless/compare/v0.7.15...v0.7.16 diff --git a/Cargo.toml b/Cargo.toml index 6ff17f1f..a900f675 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,14 @@ [package] authors = [ - "Jorge Aparicio ", - "Per Lindgren ", - "Emil Fresk ", + "Jorge Aparicio ", + "Per Lindgren ", + "Emil Fresk ", ] categories = ["data-structures", "no-std"] description = "`static` friendly data structures that don't require dynamic memory allocation" documentation = "https://docs.rs/heapless" edition = "2021" +rust-version = "1.87" keywords = ["static", "no-heap"] license = "MIT OR Apache-2.0" name = "heapless" @@ -23,11 +24,19 @@ bytes = ["dep:bytes"] portable-atomic = ["dep:portable-atomic"] # Enable polyfilling of atomics via portable-atomic, using critical section for locking -portable-atomic-critical-section = ["dep:portable-atomic", "portable-atomic", "portable-atomic?/critical-section"] +portable-atomic-critical-section = [ + "dep:portable-atomic", + "portable-atomic", + "portable-atomic?/critical-section", +] # Enable polyfilling of atomics via portable-atomic, using disabling interrupts for locking. # WARNING: this is only sound for single-core bare-metal privileged-mode targets! -portable-atomic-unsafe-assume-single-core = ["dep:portable-atomic", "portable-atomic", "portable-atomic?/unsafe-assume-single-core"] +portable-atomic-unsafe-assume-single-core = [ + "dep:portable-atomic", + "portable-atomic", + "portable-atomic?/unsafe-assume-single-core", +] # implement serde traits. serde = ["dep:serde"] @@ -65,13 +74,13 @@ static_assertions = "1.1.0" [package.metadata.docs.rs] features = [ - "bytes", - "ufmt", - "serde", - "defmt", - "mpmc_large", - "portable-atomic-critical-section", - "alloc", + "bytes", + "ufmt", + "serde", + "defmt", + "mpmc_large", + "portable-atomic-critical-section", + "alloc", ] # for the pool module targets = ["i686-unknown-linux-gnu"] diff --git a/README.md b/README.md index caf0a06d..6d84916b 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,11 @@ Licensed under either of at your option. +## MSRV Policy + +This crate is guaranteed to compile with the latest two stable releases of Rust. For example, if the +latest stable Rust release is 1.70, then this crate is guaranteed to compile with Rust 1.69 and 1.70. + ## Contribution Unless you explicitly state otherwise, any contribution intentionally submitted