Skip to content

Commit 3035602

Browse files
author
Niko Matsakis
committed
add more details about the plans
1 parent 127ab7a commit 3035602

File tree

1 file changed

+73
-4
lines changed

1 file changed

+73
-4
lines changed

src/2025h1/rfl.md

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,27 @@ We also began work on tooling stabilization with an [RFC proposing an approach t
5959

6060
### The next six months
6161

62-
Over the next six months our goal is to stabilize the major bits of tooling used by the Rust for Linux project...
62+
Over the next six months our goal is to stabilize the major bits of tooling used by the Rust for Linux project. Some of these work items are complex enough to be tracked independently as their own project goals, in which case they are linked.
63+
64+
* implementing RFC #3716 to stabilize ABI-modifying compiler flags to control code generation, sanitizer integration, and so forth:
65+
* arm64: `-Zbranch-protection`, `-Zfixed-x18`, `-Zuse-sync-unwind`.
66+
* x86: `-Zcf-protection`, `-Zfunction-return`, `-Zno-jump-tables`, `-Zpatchable-function-entry`, retpoline (`+retpoline-external-thunk,+retpoline-indirect-branches,+retpoline-indirect-calls`), SLS (`+harden-sls-ijmp,+harden-sls-ret`).
67+
* x86 32-bit: `-Zregparm=3`, `-Zreg-struct-return`.
68+
* LoongArch: `-Zdirect-access-external-data`.
69+
* production sanitizer flags: `-Zsanitizer=shadow-call-stack`, `-Zsanitizer=kcfi`, `-Zsanitizer-cfi-normalize-integer`.
70+
* the ability to extract dependency info and to configure no-std without requiring it in the source file:
71+
* currently using `-Zbinary_dep_depinfo=y` and `-Zcrate-attr`
72+
* stable rustdoc features allowing the RFL project to extract and customize rustdoc tests:
73+
* clippy configuration (`.clippy.toml` in particular and `CLIPPY_CONF_DIR`);
74+
* [a blessed way to rebuild std](./build-std.md): RFL needs a way to rebuild the standard library using stable calls to rustc. Currently building the standard library with rustc is not supported. This is a precursor to what is commonly called `-Zbuild-std`; it is also a blocker to making full use of API-modifying compiler flags and similar features, since they can't be used effectively unless the kernel is rebuilt.
75+
76+
In addition, as follow-up from 2024H2, we wish to complete [arbitrary self types v2][astv2] stabilization.
77+
78+
### The "shiny future" we are working towards
79+
80+
The ultimate target for this line of work is that Rust code in the Linux kernel builds on stable Rust with a Minimum Supported Rust Version (MSRV) tied to some external benchmark, such as Debian stable. This is the minimum requirement for Rust integration to proceed from an "experiment" so something that could become a permanent part of Linux.
81+
82+
Looking past the bare minimum, the next target would be making "quality of life" improvements that make it more ergonomic to write Rust code in the kernel (and similar codebases). One such example is the proposed experiment for [field projections](./field-projections.md).
6383

6484
## Design axioms
6585

@@ -72,10 +92,59 @@ Here is a detailed list of the work to be done and who is expected to do it. Thi
7292

7393
* The ![Team][] badge indicates a requirement where Team support is needed.
7494

75-
| Task | Owner(s) or team(s) | Notes |
76-
|----------------------------|---------------------|-------|
77-
| Overall program management | @nikomatsakis | |
95+
| Task | Owner(s) or team(s) | Notes |
96+
|------------------------------|----------------------------------------------|-------|
97+
| Discussion and moral support | ![Team][] [compiler][] [rustdoc][] [cargo][] | |
98+
| Overall program management | @nikomatsakis | |
99+
100+
### ABI-modifying compiler flags
101+
102+
Goal: stabilizing various ABI-modifying flags such as `-Zbranch-protection` and friends.
103+
104+
| Task | Owner(s) or team(s) | Notes |
105+
|------------------------|------------------------|---------------------------------------------------------|
106+
| Author RFC | @darksonn | ![Completed][] |
107+
| RFC decision | ![Team][] [compiler][] | RFC #3716, currently in PFCP |
108+
| Implementation | ![Help Wanted][] | For each flag, need to move flags from `-Z` to `-C` etc |
109+
| Standard reviews | ![Team][] [compiler] | |
110+
| Stabilization decision | ![Team][] [compiler][] | For each of the relevant compiler flags |
111+
112+
### Extract dependency information, configure no-std externally
113+
114+
Goal: support extraction of dependency information (similar to `-Zbinary_dep_depinfo=y` today) and ability to write crates without explicit, per-crate `![no_std]` (achieved via `-Zcrate-attr` today).
115+
116+
Right now there is no plan for how to approach this. This task needs an owner to pick it up, make a plan, and execute.
117+
118+
| Task | Owner(s) or team(s) | Notes |
119+
|------------------------|------------------------|-------|
120+
| Author a plan | ![Help Wanted][] | |
121+
| Implementation | ![Help Wanted][] | |
122+
| Standard reviews | ![Team][] [compiler] | |
123+
| Stabilization decision | ![Team][] [compiler][] | |
124+
125+
### Rustdoc features to extract doc tests
126+
127+
Goal: stable rustdoc features sufficient to extract doc tests without hacky regular expressions
128+
129+
| Task | Owner(s) or team(s) | Notes |
130+
|------------------------|-----------------------|-------|
131+
| Author RFC | ![Help Wanted][] | |
132+
| RFC decision | ![Team][] [rustdoc][] | |
133+
| Implementation | ![Help Wanted][] | |
134+
| Standard reviews | ![Team][] [rustdoc] | |
135+
| Stabilization decision | ![Team][] [rustdoc][] | |
136+
137+
### Clippy configuration
138+
139+
Goal: stabilized approach to customizing clippy (like `.clippy.toml` and `CLIPPY_CONF_DIR` today).
78140

141+
As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/257328-clippy/topic/stablization.20of.20clippy.2Etoml.20a), the relevant policy is already correct, but documentation is needed.
79142

143+
| Task | Owner(s) or team(s) | Notes |
144+
|------------------------|----------------------|-------|
145+
| Author documentation | ![Help Wanted][] | |
146+
| Stabilization decision | ![Team][] [clippy][] | |
80147

148+
### Blessed way to rebuild std
81149

150+
See [build-std](./build-std.md) goal.

0 commit comments

Comments
 (0)