Skip to content

Commit bd4aa37

Browse files
committed
updates after feedback from discussions
1 parent fbe6b78 commit bd4aa37

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

src/2025h1/build-std.md

+24-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ library, this is useful for a variety of reasons:
2727
- Re-building the standard library with different configuration options (e.g. changing the
2828
optimisation level, using flags which change the ABI, or which add additional exploit
2929
mitigations).
30-
- Re-building the standard library with different `cfg`s (e.g. disabling `backtrace` in std).
30+
- Re-building the standard library with different `cfg`s (e.g. disabling `backtrace` in std), to
31+
the extent that such configurations are supported by the standard library.
3132
- Stabilisation of various compiler flags which change the ABI, add additional exploit
3233
mitigations (such as `-Zsanitizers=cfi` or `-Zbranch-protection`), or which otherwise only make
3334
sense to use when the entire program is compiled with the flag (including std) is blocked on
@@ -37,6 +38,20 @@ These features are more useful for some subsets of the Rust community, such as e
3738
where optimising for size can be more important and where the targets often don't ship with a
3839
pre-compiled std.
3940

41+
The fifty-thousand foot view of the work involved in this feature is:
42+
43+
- Having the standard library sources readily available that match the compiler.
44+
- Being able to build those sources without using a nightly toolchain, which has many
45+
possible solutions.
46+
- Having a blessed way to build at least `core` without Cargo, which some users like
47+
Rust for Linux would like.
48+
- This would be optional but may be a side-effect of whatever mechanism for build-std
49+
the MVP RFC eventually proposes.
50+
- Being able to tell the compiler to use the resulting prebuilt standard library sources
51+
instead of the built-in standard library, in a standard way.
52+
- Integrating all of the above into Cargo.
53+
- Making sure all of this works for targets that don't have a pre-built std.
54+
4055
Rust for Linux and some other projects have a requirement to build core themselves without Cargo
4156
(ideally using the same stable compiler they use for the rest of their project), which is a shared
4257
requirement with build-std, as whatever mechanism these projects end up using could be re-used by
@@ -50,6 +65,14 @@ since its initial development in 2019/2020. There are a variety of issues in the
5065
experimental implementation to vague "investigate and think about this" issues, which make the
5166
feature difficult to make progress on.
5267

68+
Some of the work required for this exists in the current perma-unstable `-Zbuild-std`
69+
implementation, which may be re-used if appropriate.
70+
71+
Prior to the submission of this goal, this goal has been discussed with the cargo team and
72+
leads of the compiler and library teams, ensuring that this goal's owners have liaisons from
73+
stakeholder teams and the support of the primary teams involved in the design and
74+
implementation.
75+
5376
[wg-cargo-std-aware]: https://github.com/rust-lang/wg-cargo-std-aware
5477

5578
### The next 6 months
@@ -99,9 +122,6 @@ which can be designed and implemented to complete the build-std feature.
99122
| ↳ Author RFC | @adamgemmell | |
100123
| ↳ Implementation | @adamgemmell | |
101124
| ↳ Standard reviews | ![Team][] [cargo] | |
102-
| ↳ RFC decision | ![Team][] [cargo] | |
103-
| ↳ Author stabilization report | @adamgemmell | |
104-
| ↳ Stabilization decision | ![Team][] [cargo] | |
105125

106126
### Definitions
107127

0 commit comments

Comments
 (0)