Skip to content

Commit 998344d

Browse files
committed
doc(FAQ): refine MSRV policy
1 parent 6cb6fce commit 998344d

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ authors = [
3535
"Chloe Ross <[email protected]>",
3636
"Daniel Akhterov <[email protected]>",
3737
]
38+
# TODO: enable this for 0.9.0
39+
# rust-version = "1.80.0"
3840

3941
[package]
4042
name = "sqlx"

FAQ.md

+8-17
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,14 @@ For each database and where applicable, we test against the latest and oldest ve
2020
-------------------------------------------------------------------
2121
### What versions of Rust does SQLx support? What is SQLx's MSRV\*?
2222

23-
Officially, we will only ever support the latest stable version of Rust.
24-
It's just not something we consider to be worth keeping track of, given the current state of tooling.
25-
26-
Cargo does support a [`rust-version`] field now in the package manifest, however that will only ensure
27-
that the user is using a `rustc` of that version or greater; it does not enforce that the crate's code is
28-
actually compatible with that version of Rust. That would need to be manually enforced and checked with CI,
29-
and we have enough CI passes already.
30-
31-
In practice, we tend not to reach for language or library features that are *too* new, either because
32-
we don't need them or we just worked around their absence. There are language features we're waiting to be
33-
stabilized that we want to use (Generic Associated Types and Async Traits, to name a couple) which we will
34-
be utilizing when they're available, but that will be a major refactor with breaking API changes
35-
which will then coincide with a major release.
36-
37-
Thus, it is likely that a given SQLx release _will_ work with older versions of Rust. However,
38-
we make no guarantees about which exact versions it will work with besides the latest stable version,
39-
and we don't factor MSRV bumps into our semantic versioning.
23+
SQLx's MSRV is the second-to-latest stable release as of the beginning of the current release cycle (`0.x.0`).
24+
It will remain there until the next major release (`0.{x + 1}.0`).
25+
26+
This guarantees that SQLx will compile with a Rust version that is _at least_ six weeks old, which should be plenty
27+
of time for it to make it through any packaging system that is being actively kept up to date.
28+
29+
We do _not_ recommend installing Rust through operating system packages,
30+
as they can often be a whole year or more out-of-date.
4031

4132
\*Minimum Supported Rust Version
4233

rust-toolchain.toml

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# NOTE: this does NOT indicate a Minimum Supported Rust Version (MSRV) of SQLx.
2-
# We reserve the right to increase this version at any time without considering it to be a breaking change.
3-
# See the answer in FAQ.md for details.
1+
# Note: should NOT increase during a minor/patch release cycle
42
[toolchain]
5-
channel = "1.80"
3+
channel = "1.78"
64
profile = "minimal"

0 commit comments

Comments
 (0)