Skip to content

Commit 7163810

Browse files
committed
history: mention no_std usability issues
1 parent c740a18 commit 7163810

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

text/0000-build-std/2-history.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,18 @@ Cargo's subcommands including `metadata`, `clean`, `vendor`, `pkgid` and the
446446
`-p` options for various commands. Support for `cargo fetch` was implemented in
447447
[cargo#10129].
448448

449+
## `no_std` Usability
450+
[no_std-usability]: #no_std-usability
451+
452+
There are also issues related to the usability of `no_std` crates:
453+
454+
- Discoverability of `no_std` crates is difficult with a mix of categories
455+
(`no-std`) and keywords (`nostd`/`no_std`) that are not used consistently by
456+
`no_std` crates ([crates.io#7306]).
457+
458+
- `no_std` crates can accidentally and easily depend on crates that use `std`
459+
which can result in build failures in some targets ([cargo#8798]).
460+
449461
## Related work
450462
[related-work]: #related-work
451463

@@ -488,6 +500,8 @@ features that are related or would be beneficial for build-std:
488500
[cargo#7216]: https://github.com/rust-lang/cargo/pull/7216
489501
[cargo#7421]: https://github.com/rust-lang/cargo/pull/7421
490502
[cargo#8490]: https://github.com/rust-lang/cargo/pull/8490
503+
[cargo#8798]: https://github.com/rust-lang/cargo/issues/8798
504+
[crates.io#7306]: https://github.com/rust-lang/crates.io/pull/7306
491505
[rfcs#1133]: https://github.com/rust-lang/rfcs/pull/1133
492506
[rfcs#2663]: https://github.com/rust-lang/rfcs/pull/2663
493507
[rfcs#3516]: https://rust-lang.github.io/rfcs/3516-public-private-dependencies.html

text/0000-build-std/4-appendix-literature-review.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,23 @@ general feature for Cargo that could then apply to build-std too:
13471347
fixed by a change to that mechanism, rather than anything specific to
13481348
build-std
13491349

1350+
## Other issues
1351+
[a1-other-issues]: #other-issues
1352+
1353+
There are a handful of other issues that are not directly referencing build-std,
1354+
but which affect related features in the toolchain, such as `no_std` crates:
1355+
1356+
- **[keyword nostd vs no_std vs category no-std][crates.io#7306]**, [gnzlbg], Feb 2018
1357+
- There is `no-std` category as well as a `nostd` and `no_std` keywords used
1358+
by crates. Not every crate which uses the `nostd`/`no_std` keywords also
1359+
uses the `no-std` category, and vice versa, making it harder to list all
1360+
`no_std`-supporting crates with a single search.
1361+
- **[no_std crates should not permit non-no_std dependencies][cargo#8798]**, [zesterer], Oct 2020
1362+
- Cargo permits `no_std` crates to depend on crates that use the standard
1363+
library. When working with a target that does not ship the `std` crate, the
1364+
presence of these crates in the dependency graph can result in unexpected
1365+
build failures.
1366+
13501367
[history]: ./2-history.md
13511368

13521369
[JOSH]: https://josh-project.github.io/josh/intro.html
@@ -1395,6 +1412,7 @@ general feature for Cargo that could then apply to build-std too:
13951412
[cargo#8177]: https://github.com/rust-lang/cargo/pull/8177
13961413
[cargo#8490]: https://github.com/rust-lang/cargo/pull/8490
13971414
[cargo#8733]: https://github.com/rust-lang/cargo/issues/8733
1415+
[cargo#8798]: https://github.com/rust-lang/cargo/issues/8798
13981416
[cargo#8834]: https://github.com/rust-lang/cargo/pull/8834
13991417
[cargo#8945]: https://github.com/rust-lang/cargo/issues/8945
14001418
[cargo#8962]: https://github.com/rust-lang/cargo/issues/8962
@@ -1404,6 +1422,7 @@ general feature for Cargo that could then apply to build-std too:
14041422
[cargo#9976]: https://github.com/rust-lang/cargo/issues/9976
14051423
[compiler-builtins#411]: https://github.com/rust-lang/compiler-builtins/pull/411
14061424
[compiler-builtins#532]: https://github.com/rust-lang/compiler-builtins/pull/532
1425+
[crates.io#7306]: https://github.com/rust-lang/crates.io/pull/7306
14071426
[internals.r-l.o: Fleshing out libstd scenarios]: https://internals.rust-lang.org/t/fleshing-out-libstd-scenarios/4206
14081427
[internals.r-l.o: Refactoring libstd for ultimate portability]: https://internals.rust-lang.org/t/refactoring-std-for-ultimate-portability/4301
14091428
[jamesmunns/rfcs#1]: https://github.com/jamesmunns/rfcs/pull/1
@@ -1564,6 +1583,7 @@ general feature for Cargo that could then apply to build-std too:
15641583
[fee1-dead]: https://github.com/fee1-dead
15651584
[george-hopkins]: https://github.com/george-hopkins
15661585
[ghost]: https://github.com/ghost
1586+
[gnzlbg]: https://github.com/gnzlbg
15671587
[harmou01]: https://github.com/harmou01
15681588
[hnj2]: https://github.com/hnj2
15691589
[illuzen]: https://github.com/illuzen
@@ -1591,3 +1611,4 @@ general feature for Cargo that could then apply to build-std too:
15911611
[wcampbell0x2a]: https://github.com/wcampbell0x2a
15921612
[weihanglo]: https://github.com/weihanglo
15931613
[yogh333]: https://github.com/yogh333
1614+
[zesterer]: https://github.com/zesterer

0 commit comments

Comments
 (0)