Skip to content

Commit

Permalink
Unstable features / Rust version policy: reorganize and update pre-me…
Browse files Browse the repository at this point in the history
…rge CI information

Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Sep 25, 2024
1 parent b77d071 commit 8c57737
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/Rust-version-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ The kernel documents the [minimal requirements](https://docs.kernel.org/process/

For the moment, we cannot guarantee newer Rust versions will always work due to the [unstable features](Unstable-features.md) in use[^rust-is-stable]. Removing the need for them is a priority of the project.

To ameliorate that, the kernel is now being built-tested by Rust's pre-merge CI. That is, every change that is attempting to land into the Rust compiler is tested against the kernel, and it is merged only if it passes. Similarly, the `bindgen` tool is also building the kernel in their pre-merge CI too.
To ameliorate that, the kernel is now being [build-tested](https://rustc-dev-guide.rust-lang.org/tests/rust-for-linux.html) in Rust's pre-merge CI. That is, every change that is attempting to land into the Rust compiler is tested against the kernel, and it is merged only if it passes. Similarly, the `bindgen` tool is also building the kernel in their pre-merge CI too.

Thus, with the pre-merge CI in place, those projects hope to avoid unintentional changes to Rust that break the kernel. This means that, in general, apart from intentional changes on their side (that we will need to workaround conditionally on our side), the upcoming Rust compiler versions should generally work. This applies to beta and nightly versions of Rust as well.
Thus, with the pre-merge CI in place, those projects hope to avoid unintentional changes to Rust and `bindgen` that break the kernel. This means that, in general, apart from intentional changes on their side (that we will need to workaround conditionally on our side), the upcoming Rust and `bindgen` versions should generally work. This applies to beta and nightly versions of Rust as well.

In addition, the Rust project has proposed getting the kernel into stable Rust (at least solving the main blockers) as one of its three [flagship goals for 2024H2](https://rust-lang.github.io/rust-project-goals/2024h2/index.html#flagship-goals).
In addition, one of the three [flagship goals for 2024H2](https://rust-lang.github.io/rust-project-goals/2024h2/index.html#flagship-goals) of the Rust project is getting the kernel into stable Rust (at least solving the main blockers).

[^rust-is-stable]: To clarify, the Rust language is stable, i.e. it promises backwards compatibility, except for those unstable features.

Expand Down
8 changes: 1 addition & 7 deletions src/Unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ If you would like to use a new Rust unstable feature in the kernel, then please

## Rust for Linux in the Rust pre-merge CI

Rust for Linux is currently being [built-tested](https://rustc-dev-guide.rust-lang.org/tests/rust-for-linux.html) in Rust's pre-merge CI, i.e. the process that checks every change that is attempting to land into the Rust project in order to always keep it in a valid state.

This allows both Rust for Linux and the Rust project to catch very early any unexpected changes that would break the kernel's usage of unstable features, as well as any other change that may affect it.

The CI job may still need to be temporarily disabled for different reasons, but the intention is to help bring Rust for Linux into stable Rust.

Thanks to the Rust project for adding the Linux kernel to their CI!
In order to catch any unexpected changes that would break the kernel's usage of unstable features, the kernel is build-tested in the pre-merge Rust project CI. Please see the [Rust version policy](Rust-version-policy.md) page for details.

### `alloc` (older releases)

Expand Down

0 comments on commit 8c57737

Please sign in to comment.