Skip to content

Commit 1f0a200

Browse files
committed
fix typos, grammatical errors and missing words
1 parent c8649ed commit 1f0a200

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

text/3873-build-std-context.md

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ be able to support many use cases that those waiting for build-std hope that it
5959
will. This is also an explicit and deliberate choice for the build-std project
6060
goal's proposals.
6161

62-
This RFC will focus on summarising these previous discussion and proposals in
62+
This RFC will focus on summarising these previous discussions and proposals in
6363
order to enable an MVP of build-std to be accepted and stabilised. This will lay
6464
the foundation for future proposals to lift restrictions and enable build-std to
6565
support more use cases, without those proposals having to survey the ten-plus
@@ -96,12 +96,11 @@ The following terminology is used throughout the RFC:
9696
standard library
9797

9898
Throughout the build-std project goal's later RFCs, parentheses with "?" links
99-
([?][rationale-rationale]) will be present that which link the relevant section
100-
in the appropriate "Rationale and alternatives" section to justify a decision or
101-
provide alternatives to it.
99+
([?][rationale-rationale]) will be present which link to the relevant "Rationale
100+
and alternatives" section to justify a decision or provide alternatives to it.
102101

103102
Additionally, "note alerts" will be used in the *Proposal* sections to separate
104-
implementation considerations from the core proposal. Implementation detail
103+
implementation considerations from the core proposal. Implementation details
105104
should be considered non-normative. These details could change during
106105
implementation and are present solely to demonstrate that the implementation
107106
feasibility has been considered and to provide an example of how implementation
@@ -312,18 +311,18 @@ from the sysroot.
312311
`--extern` has a `noprelude` modifier which will allow the user to use
313312
`--extern` to specify the location at which a crate can be found without adding
314313
it to the extern prelude. This could allow a path for crates like `alloc` or
315-
`test` to be provided without effecting the observable behaviour of the
314+
`test` to be provided without affecting the observable behaviour of the
316315
language.
317316

318317
## Panic strategies
319318
[background-panic-strategies]: #panic-strategies
320319

321320
Rust has the concept of a *panic handler*, which is a crate that is responsible
322321
for performing a panic. There are various panic handler crates on crates.io,
323-
such as [panic-abort] (which different from the `panic_abort` panic runtime!),
324-
[panic-halt], [panic-itm], and [panic-semihosting]. Panic handler crates define
325-
a function annotated with `#[panic_handler]`. There can only be one
326-
`#[panic_handler]` in the crate graph.
322+
such as [panic-abort] (which is different from the `panic_abort` panic
323+
runtime!), [panic-halt], [panic-itm], and [panic-semihosting]. Panic handler
324+
crates define a function annotated with `#[panic_handler]`. There can only be
325+
one `#[panic_handler]` in the crate graph.
327326

328327
`core` uses the panic handler to implement panics inserted by code generation
329328
(e.g. arithmetic overflow or out-of-bounds access) and the `core::panic!` macro
@@ -373,8 +372,8 @@ what its dependencies are, etc.
373372

374373
Cargo can query registries using a Git protocol which caches the registry on
375374
disk, or using a sparse protocol which exposes the index over HTTP and allows
376-
Cargo to avoid Cargo having a local copy of the whole index, which has become
377-
quite large for crates.io.
375+
Cargo to avoid having a local copy of the whole index, which has become quite
376+
large for crates.io.
378377

379378
crates.io's registry index is exposed as both a HTTP API and a Git repository -
380379
[rust-lang/crates.io-index] - both are updated automatically by crates.io when
@@ -385,11 +384,11 @@ Each crate in the registry index has a JSON file, following
385384
and crates.io teams. Crates may refer to those in other registries, but all
386385
non-`path`/`git` crates in the dependency graph must exist in a registry. As the
387386
registry index drives the building of Cargo's dependency graph, all
388-
non-`path`/`git` crates that end up in the dependency graph must be present a
387+
non-`path`/`git` crates that end up in the dependency graph must be present in a
389388
registry.
390389

391390
When a package is published, Cargo posts a JSON blob to the registry which is
392-
not a index entry but has sufficient information to generate one. crates.io does
391+
not an index entry but has sufficient information to generate one. crates.io does
393392
not use Cargo's JSON blob, instead re-generating it from the `Cargo.toml` (this
394393
avoids the index and `Cargo.toml` from going out-of-sync due to bugs or
395394
malicious publishes). As a consequence, changes to the index format must be
@@ -414,7 +413,7 @@ so as to make it easier to avoid breaking semver compatibility.
414413
With the `public-dependency` feature enabled, dependencies are marked as
415414
"private" by default which can be overridden with a `public = true` declaration.
416415

417-
Private dependencies are passed to rustc with an `priv` modifier to the
416+
Private dependencies are passed to rustc with a `priv` modifier to the
418417
`--extern` flag. Dependencies without this modifier are treated as public by
419418
rustc for backwards compatibility reasons. rust emits the
420419
`exported-private-dependencies` lint if an item from a private dependency is
@@ -453,9 +452,9 @@ This RFC proposed that the standard library be made an explicit dependency in
453452
`Cargo.toml` and be rebuilt automatically when required. An implicit dependency
454453
on the standard library would be added automatically unless an explicit
455454
dependency is written. This RFC was written prior to a stable `#![no_std]`
456-
attribute and so does not address the circumstance where a implicit dependency
457-
would make a no-std crate fail to compile on a target that does not support
458-
the standard library.
455+
attribute and so does not address the circumstance where an implicit dependency
456+
would make a `#![no_std]` crate fail to compile on a target that does not
457+
support the standard library.
459458

460459
There were objectives of and possibilities enabled by the RFC that were not
461460
shared with the project teams at the time, such as the standard library being
@@ -467,7 +466,7 @@ of [cargo#4959].
467466
## [xargo] and [cargo#4959] (2016)
468467
[xargo-and-cargo-4959-2016]: #xargo-and-cargo4959-2016
469468

470-
While the discussions around [rfcs#1133] where ongoing, [xargo] was released in
469+
While the discussions around [rfcs#1133] were ongoing, [xargo] was released in
471470
2016. Xargo is a Cargo wrapper that builds a sysroot with a customised standard
472471
library and then uses that with regular Cargo operations (i.e. `xargo build`
473472
performs the same operation as `cargo build` but with a customised standard
@@ -505,18 +504,18 @@ and applying different codegen flags to the standard library. It did not concern
505504
itself with build-std's potential use in `rustbuild` or with abolishing the
506505
sysroot.
507506

508-
[rfcs#2663] was primarily concerned what functionality should be available to
509-
the user and what the user experience ought to be. It proposed that `core`,
510-
`alloc` and `std` be automatically built when the target did not have a pre-built
511-
standard library available through rustup. It would be automatically rebuilt on
512-
any target when the profile configuration was modified such that it no longer
513-
matched the pre-built standard library. If using nightly, the user could enable
514-
Cargo features and modify the source of the standard library. Standard library
515-
dependencies were implicit by default, as today, but would be written explicitly
516-
when enabling Cargo features. It also aimed to stabilise the target-spec-json
517-
format and allow "stable" Cargo features to be enabled on stable toolchains, and
518-
as such proposed the concept of stable and unstable Cargo features be
519-
introduced.
507+
[rfcs#2663] was primarily concerned with what functionality should be available
508+
to the user and what the user experience ought to be. It proposed that `core`,
509+
`alloc` and `std` be automatically built when the target did not have a
510+
pre-built standard library available through rustup. It would be automatically
511+
rebuilt on any target when the profile configuration was modified such that it
512+
no longer matched the pre-built standard library. If using nightly, the user
513+
could enable Cargo features and modify the source of the standard library.
514+
Standard library dependencies were implicit by default, as today, but would be
515+
written explicitly when enabling Cargo features. It also aimed to stabilise the
516+
target-spec-json format and allow "stable" Cargo features to be enabled on
517+
stable toolchains, and as such proposed the concept of stable and unstable Cargo
518+
features be introduced.
520519

521520
There was a lot of feedback on [rfcs#2663] which largely stemmed from it being
522521
very high-level, containing many large unresolved questions and details left for
@@ -577,7 +576,7 @@ categories:
577576
entirety seems to be uncertain.
578577

579578
[`cargo vendor`][wg-cargo-std-aware#23] did receive lots of discussion.
580-
Vendoring the standard library is desirable (for the same reasons as any
579+
Vendoring the standard library is desirable (for the same reasons as any
581580
vendoring), but would lock the user to a specific version of the toolchain
582581
when using a vendored standard library. However, if the `rust-src` component
583582
contained already-vendored dependencies, then `cargo vendor` would not need
@@ -694,9 +693,9 @@ categories:
694693

695694
[wg-cargo-std-aware#43] investigates the options for the UX of build-std.
696695
`-Zbuild-std` flag is not a good experience as it needs added to every
697-
invocation and has few extension points. Using build-std should be a unstable
698-
feature at first. It was argued that build-std should be transparent and
699-
happen automatically when Cargo determines it is necessary. There are
696+
invocation and has few extension points. Using build-std should be an
697+
unstable feature at first. It was argued that build-std should be transparent
698+
and happen automatically when Cargo determines it is necessary. There are
700699
concerns that this could trigger too often and that it should only happen
701700
automatically for ABI-modifying flags.
702701

@@ -806,12 +805,12 @@ and target , but this restriction was later resolved ([cargo#14317]).
806805

807806
A second flag, [`-Zbuild-std-features`][build-std-features], was added in
808807
[cargo#8490] and allows overriding the default Cargo features of the standard
809-
library. Like the arguments to `-Zbuild-std`, this values accepted by this flag
808+
library. Like the arguments to `-Zbuild-std`, the values accepted by this flag
810809
are inherently unstable as the library team has not committed to any of the
811810
standard library's Cargo features being stable. Features are enabled on the
812811
`sysroot` crate and propagate down through the crate graph of the standard
813-
library (e.g. `compiler-builtins-mem` is a feature in `sysroot`, `std`,
814-
`alloc`, and `core` until `compiler_builtins`).
812+
library (e.g. `compiler-builtins-mem` is a feature in `sysroot`, `std`, `alloc`,
813+
and `core` until `compiler_builtins`).
815814

816815
build-std gets the source of the standard library from the `rust-src` rustup
817816
component. This does not happen automatically and the user must ensure the
@@ -988,7 +987,7 @@ rebuild the standard library.
988987
- Similarly, when deploying to known environments, use of `target-cpu` or
989988
`target-feature` can improve the performance of code generation or allow
990989
the use of newer hardware features than the target's baseline provides. As
991-
above, these configuration will not apply to the pre-built standard
990+
above, these configurations will not apply to the pre-built standard
992991
library
993992

994993
- While the pre-built standard library is built to support debugging without
@@ -1022,7 +1021,7 @@ this goal will attempt to ensure they remain viable as future possibilities):
10221021
flags that would not be appropriate for the pre-built standard library, so
10231022
is forced to require nightly and build its own sysroot
10241023

1025-
Some use cases are unlikely to supported by the project unless a new and
1024+
Some use cases are unlikely to be supported by the project unless a new and
10261025
compelling use-case is presented, and so this project goal may make decisions
10271026
which make these motivations harder to solve in future:
10281027

@@ -1187,7 +1186,7 @@ standard library.
11871186
[rust#46439]: https://github.com/rust-lang/rust/pull/46439
11881187
[rust#71009]: https://github.com/rust-lang/rust/issues/71009
11891188
[rust#67074]: https://github.com/rust-lang/rust/issues/67074
1190-
[rust#122305]: https://github.com/rust-lang/rust/pull/128534
1189+
[rust#122305]: https://github.com/rust-lang/rust/pull/122305
11911190
[rust#128534]: https://github.com/rust-lang/rust/pull/128534
11921191
[rust#136966]: https://github.com/rust-lang/rust/issues/136966
11931192

0 commit comments

Comments
 (0)