From c00c1e9eb72bb1ebea67428bfa78e84783b36c7d Mon Sep 17 00:00:00 2001 From: John Nunley Date: Fri, 8 Sep 2023 08:34:55 -0700 Subject: [PATCH] Add an MSRV policy to the README (#3046) --- .github/workflows/ci.yml | 7 +++++++ README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d739f0272a..00ee61e1b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,13 @@ jobs: - { name: 'iOS x86_64', target: x86_64-apple-ios, os: macos-latest, } - { name: 'iOS Aarch64', target: aarch64-apple-ios, os: macos-latest, } - { name: 'web', target: wasm32-unknown-unknown, os: ubuntu-latest, } + exclude: + # Android is tested on stable-3 + - toolchain: '1.65.0' + platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' } + include: + - toolchain: '1.69.0' + platform: { name: 'Android', target: aarch64-linux-android, os: ubuntu-latest, options: '--package=winit --features=android-native-activity', cmd: 'apk --' } env: # Set more verbose terminal output diff --git a/README.md b/README.md index 0f1cf7f3f4..9d0c9c60d2 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,35 @@ Winit provides the following features, which can be enabled in your `Cargo.toml` * `wayland` (enabled by default): On Unix platform, compiles with the Wayland backend * `mint`: Enables mint (math interoperability standard types) conversions. +## MSRV Policy + +The Minimum Supported Rust Version (MSRV) of this crate is **1.65**. Changes to +the MSRV will be accompanied by a minor version bump. + +As a **tentative** policy, the upper bound of the MSRV is given by the following +formula: + +``` +min(sid, stable - 3) +``` + +Where `sid` is the current version of `rustc` provided by [Debian Sid], and +`stable` is the latest stable version of Rust. This bound may be broken in the +event of a major ecosystem shift or a security vulnerability. + +[Debian Sid]: https://packages.debian.org/sid/rustc + +The exception to this is for the Android platform, where a higher Rust version +must be used for certain Android features. In this case, the MSRV will be +capped at the latest stable version of Rust minus three. This inconsistency is +not reflected in Cargo metadata, as it is not powerful enough to expose this +restriction. + +All crates in the [`rust-windowing`] organizations have the +same MSRV policy. + +[`rust-windowing`]: https://github.com/rust-windowing + ### Platform-specific usage #### Wayland