From a948f59f45908774a964e447d587dbf79a078806 Mon Sep 17 00:00:00 2001 From: Evgeny Safronov Date: Mon, 13 Jul 2026 11:58:47 +0300 Subject: [PATCH] chore: declare the MSRV as Rust 1.88 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The crate never stated a minimum toolchain, so its real one drifted silently with whatever the code happened to use — until the previous commit it stood at 1.95, purely because of one `core::hint::cold_path()` call. It is now declared as 1.88 and pinned in three places: `rust-version` in the manifest, so cargo reports a clear "requires rustc 1.88" instead of a spray of unstable-feature errors; a CI job on exactly that toolchain, so the next newer-than-1.88 feature fails the pull request that introduces it; and the README, which states the policy — an MSRV bump is a minor version bump, never a patch one. 1.88 is what edition 2024 plus let-chains cost; nothing in the library needs more. The CI job checks `--lib` only: tests and benches pull in criterion and proptest, which track their own, newer minimum toolchain. --- .github/workflows/ci.yml | 13 +++++++++++++ Cargo.toml | 1 + README.md | 9 ++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26f1792..a823415 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,19 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo check + msrv: + name: MSRV + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.88.0 + - uses: Swatinem/rust-cache@v2 + # The MSRV is a promise about the library, so this checks `--lib` only: + # tests and benches pull in dev-dependencies, which track their own, + # newer minimum toolchain. Keep the pinned version in sync with + # `rust-version` in `Cargo.toml`. + - run: cargo check --lib --locked + fmt: name: Format runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index 6a5e350..41e7310 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "netip" version = "0.3.7" edition = "2024" +rust-version = "1.88" license = "Apache-2.0" description = "IPv4/IPv6 network types with non-contiguous masks support" repository = "https://github.com/yanet-platform/netip" diff --git a/README.md b/README.md index c5c004b..570e7ae 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![crates.io](https://img.shields.io/crates/v/netip.svg)](https://crates.io/crates/netip) [![docs.rs](https://docs.rs/netip/badge.svg)](https://docs.rs/netip) +[![MSRV](https://img.shields.io/badge/MSRV-1.88-blue.svg)](#minimum-supported-rust-version) [![License](https://img.shields.io/crates/l/netip.svg)](LICENSE) **Zero-dependency** Rust library for IPv4/IPv6 networks and MAC addresses — with first-class support for **non-contiguous subnet masks**. @@ -184,13 +185,19 @@ let mac = MacAddr::parse_ascii(b"aa-bb-cc-dd-ee-ff").unwrap(); | `BiContiguous` | Newtype for two-run IPv6 masks — one contiguous prefix per 64-bit half | | `MacAddr` | MAC address (EUI-48), stored as lower 48 bits of `u64` | +## Minimum Supported Rust Version + +`netip` compiles on **Rust 1.88** and newer, checked in CI on every pull request against that exact toolchain. + +Raising the MSRV is treated as a breaking change: it ships in a minor version bump (`0.x`), never in a patch release. + ## Roadmap `netip` is on the path to a stable 1.0. Current version: **0.3.7**. - ~~**v0.3** — API cleanup, set-algebra completion, `Contiguous`/`BiContiguous` wrappers, slice aggregation, fast ASCII parsers, `no_std`, performance campaigns~~ ✓ - **v0.4** — API freeze, the last breaking release: `#[non_exhaustive]` error types, by-value getters. Additive alongside it: non-string constructors for `Contiguous`, `FusedIterator` on the iterators, `IpNetwork` method parity -- **v0.5+** — Testing hardening and documentation: an independent oracle for the network grammar, non-contiguous coverage across every operation, declared MSRV +- **v0.5+** — Testing hardening and documentation: an independent oracle for the network grammar, non-contiguous coverage across every operation - **v1.0** — Stable release ## License