From 998344dcb7375a1481159c53b550c549a06ccdeb Mon Sep 17 00:00:00 2001 From: Austin Bonander Date: Mon, 2 Sep 2024 13:13:01 -0700 Subject: [PATCH] doc(FAQ): refine MSRV policy --- Cargo.toml | 2 ++ FAQ.md | 21 ++++++--------------- rust-toolchain.toml | 6 ++---- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2c7d93b4..3754275b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,8 @@ authors = [ "Chloe Ross ", "Daniel Akhterov ", ] +# TODO: enable this for 0.9.0 +# rust-version = "1.80.0" [package] name = "sqlx" diff --git a/FAQ.md b/FAQ.md index 514d4ed3..b9089720 100644 --- a/FAQ.md +++ b/FAQ.md @@ -20,23 +20,14 @@ For each database and where applicable, we test against the latest and oldest ve ------------------------------------------------------------------- ### What versions of Rust does SQLx support? What is SQLx's MSRV\*? -Officially, we will only ever support the latest stable version of Rust. -It's just not something we consider to be worth keeping track of, given the current state of tooling. +SQLx's MSRV is the second-to-latest stable release as of the beginning of the current release cycle (`0.x.0`). +It will remain there until the next major release (`0.{x + 1}.0`). -Cargo does support a [`rust-version`] field now in the package manifest, however that will only ensure -that the user is using a `rustc` of that version or greater; it does not enforce that the crate's code is -actually compatible with that version of Rust. That would need to be manually enforced and checked with CI, -and we have enough CI passes already. +This guarantees that SQLx will compile with a Rust version that is _at least_ six weeks old, which should be plenty +of time for it to make it through any packaging system that is being actively kept up to date. -In practice, we tend not to reach for language or library features that are *too* new, either because -we don't need them or we just worked around their absence. There are language features we're waiting to be -stabilized that we want to use (Generic Associated Types and Async Traits, to name a couple) which we will -be utilizing when they're available, but that will be a major refactor with breaking API changes -which will then coincide with a major release. - -Thus, it is likely that a given SQLx release _will_ work with older versions of Rust. However, -we make no guarantees about which exact versions it will work with besides the latest stable version, -and we don't factor MSRV bumps into our semantic versioning. +We do _not_ recommend installing Rust through operating system packages, +as they can often be a whole year or more out-of-date. \*Minimum Supported Rust Version diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1a5a4518..29f0b096 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,6 +1,4 @@ -# NOTE: this does NOT indicate a Minimum Supported Rust Version (MSRV) of SQLx. -# We reserve the right to increase this version at any time without considering it to be a breaking change. -# See the answer in FAQ.md for details. +# Note: should NOT increase during a minor/patch release cycle [toolchain] -channel = "1.80" +channel = "1.78" profile = "minimal"