@@ -27,7 +27,8 @@ library, this is useful for a variety of reasons:
27
27
- Re-building the standard library with different configuration options (e.g. changing the
28
28
optimisation level, using flags which change the ABI, or which add additional exploit
29
29
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.
31
32
- Stabilisation of various compiler flags which change the ABI, add additional exploit
32
33
mitigations (such as ` -Zsanitizers=cfi ` or ` -Zbranch-protection ` ), or which otherwise only make
33
34
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
37
38
where optimising for size can be more important and where the targets often don't ship with a
38
39
pre-compiled std.
39
40
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
+
40
55
Rust for Linux and some other projects have a requirement to build core themselves without Cargo
41
56
(ideally using the same stable compiler they use for the rest of their project), which is a shared
42
57
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
50
65
experimental implementation to vague "investigate and think about this" issues, which make the
51
66
feature difficult to make progress on.
52
67
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
+
53
76
[ wg-cargo-std-aware ] : https://github.com/rust-lang/wg-cargo-std-aware
54
77
55
78
### The next 6 months
@@ -99,9 +122,6 @@ which can be designed and implemented to complete the build-std feature.
99
122
| ↳ Author RFC | @adamgemmell | |
100
123
| ↳ Implementation | @adamgemmell | |
101
124
| ↳ Standard reviews | ![ Team] [ ] [ cargo] | |
102
- | ↳ RFC decision | ![ Team] [ ] [ cargo] | |
103
- | ↳ Author stabilization report | @adamgemmell | |
104
- | ↳ Stabilization decision | ![ Team] [ ] [ cargo] | |
105
125
106
126
### Definitions
107
127
0 commit comments