Skip to content

Commit 297cea6

Browse files
committed
Document the MSRV of the stable channel as 1.63
Currently this crate maintains the `main` branch (future 1.0) alongside `libc-0.2` (current stable release). PRs are made against `main` then cherry picked as applicable to `libc-0.2`. Usually this flow works okay, but there is a substantial difference in minimum supported versions: libc-0.2 is tested down to 1.19 and main is tested with 1.63. This means that supported features differ quite a bit and as a result, cherry picks get conflict-heavy (e.g. `repr(align)`, `union`, and `const fn` cannot be used on `libc-0.2`). In order to make it easier to keep these branches in sync and get us close to a 1.0 release, raise the MSRV on `libc-0.2` to 1.63. This means both branches can run the exact same tests. Future Changes ============== This still does not establish a MSRV policy, which has been discussed at great length in [1]. For the purpose of unsticking us this selects 1.63 as the MSRV, which is the version currently available on Debian stable (a commonly requested reference point in [1], and about the oldest specific version mentioned). This is a documentation-only change to keep things simple, cleanup can follow. Further increases and official policy are not precluded. History ======= An attempt to raise the MSRV to 1.57 in 2022 was approved at one point [2], but never merged due to various failures. Making this a documentation-only change hopes to avoid this problem. I brought up a 0.3 release to increase versions in [3], but consensus there was that we should be able to increase the MSRV in the existing 0.2 release without a semver-breaking change. Link: rust-lang/libs-team#72 [1] Link: rust-lang#2845 [2] Link: rust-lang/libs-team#463 [3]
1 parent 539e7e7 commit 297cea6

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

README.md

+10-15
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,16 @@ libc = "0.2"
5555

5656
## Rust version support
5757

58-
The minimum supported Rust toolchain version is currently **Rust 1.13.0**. (libc
59-
does not currently have any policy regarding changes to the minimum supported
60-
Rust version; such policy is a work in progress.) APIs requiring newer Rust
61-
features are only available on newer Rust toolchains:
62-
63-
| Feature | Version |
64-
| -------------------- | ------- |
65-
| `union` | 1.19.0 |
66-
| `const mem::size_of` | 1.24.0 |
67-
| `repr(align)` | 1.25.0 |
68-
| `extra_traits` | 1.25.0 |
69-
| `core::ffi::c_void` | 1.30.0 |
70-
| `repr(packed(N))` | 1.33.0 |
71-
| `cfg(target_vendor)` | 1.33.0 |
72-
| `const-extern-fn` | 1.62.0 |
58+
The minimum supported Rust toolchain version is currently **Rust 1.63**.
59+
60+
Increases to the MSRV is allowed to change without a major (i.e. semver-
61+
breaking) release in order to avoid a ripple effect in the ecosystem.
62+
63+
`libc` may continue to compile with Rust versions older than the current MSRV
64+
but this is not guaranteed.
65+
66+
If your use case requires support for Rust versions below 1.63, it is
67+
recommended to pin `libc` with `"<=VERSION_BEFORE_THIS_MERGES"`.
7368

7469
## Platform support
7570

0 commit comments

Comments
 (0)