doc(FAQ): refine MSRV policy

This commit is contained in:
Austin Bonander 2024-09-02 13:13:01 -07:00
parent 6cb6fce793
commit 998344dcb7
3 changed files with 10 additions and 19 deletions

View file

@ -35,6 +35,8 @@ authors = [
"Chloe Ross <orangesnowfox@gmail.com>",
"Daniel Akhterov <akhterovd@gmail.com>",
]
# TODO: enable this for 0.9.0
# rust-version = "1.80.0"
[package]
name = "sqlx"

21
FAQ.md
View file

@ -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

View file

@ -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"