@@ -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
3738where optimising for size can be more important and where the targets often don't ship with a
3839pre-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+
4055Rust 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
4257requirement 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
5065experimental implementation to vague "investigate and think about this" issues, which make the
5166feature 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