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