Skip to content

Commit 710ddc1

Browse files
committed
Auto merge of #56291 - jamesmunns:upstream-embedded-book, r=steveklabnik
Initial addition of the Embedded Rust Book This PR adds the Embedded Rust Book to the bookshelf as a submodule, and adds text for the bookshelf page. I have added a new section after "Master Rust" called "Specialize Rust", with the plan that future domain WG books can also reside here. This now extends the titles down to H3, where formerly only H1 and H2 were used. The added submodule tracks the master branch of the Embedded WG repo. If there are additional steps necessary to make this work in CI (perhaps adding this to `src/ci/docker/x86_64-gnu-tools/checktools.sh:32` or so?), please let me know. CC @steveklabnik @japaric Also CC issue rust-embedded/wg#257
2 parents 8ae730a + 4633cca commit 710ddc1

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,6 @@
4444
path = src/llvm-project
4545
url = https://github.com/rust-lang/llvm-project.git
4646
branch = rustc/8.0-2019-01-16
47+
[submodule "src/doc/embedded-book"]
48+
path = src/doc/embedded-book
49+
url = https://github.com/rust-embedded/book.git

src/bootstrap/builder.rs

+1
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ impl<'a> Builder<'a> {
430430
doc::RustByExample,
431431
doc::RustcBook,
432432
doc::CargoBook,
433+
doc::EmbeddedBook,
433434
doc::EditionGuide,
434435
),
435436
Kind::Dist => describe!(

src/bootstrap/doc.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ macro_rules! book {
6161
// adding a build step in `src/bootstrap/builder.rs`!
6262
book!(
6363
EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::MdBook1;
64+
EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::MdBook2;
6465
Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook1;
6566
Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1;
6667
RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::MdBook1;
@@ -71,10 +72,6 @@ book!(
7172
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7273
enum RustbookVersion {
7374
MdBook1,
74-
75-
/// Note: Currently no books use mdBook v2, but we want the option
76-
/// to be available
77-
#[allow(dead_code)]
7875
MdBook2,
7976
}
8077

src/ci/docker/x86_64-gnu-tools/checktools.sh

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ python2.7 "$X_PY" test --no-fail-fast \
2323
src/doc/nomicon \
2424
src/doc/reference \
2525
src/doc/rust-by-example \
26+
src/doc/embedded-book \
2627
src/tools/clippy \
2728
src/tools/rls \
2829
src/tools/rustfmt \

src/doc/embedded-book

Submodule embedded-book added at d663113

src/doc/index.md

+16
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,19 @@ Rust. It's also sometimes called "the 'nomicon."
117117
[The `rustc` Guide](https://rust-lang.github.io/rustc-guide/) documents how
118118
the compiler works and how to contribute to it. This is useful if you want to build
119119
or modify the Rust compiler from source (e.g. to target something non-standard).
120+
121+
# Specialize Rust
122+
123+
When using Rust in specific domain areas, consider using the following resources tailored to each domain.
124+
125+
## Embedded Systems
126+
127+
When developing for Bare Metal or Embedded Linux systems, you may find these resources maintained by the [Embedded Working Group] useful.
128+
129+
[Embedded Working Group]: https://github.com/rust-embedded
130+
131+
### The Embedded Rust Book
132+
133+
[The Embedded Rust Book] is targeted at developers familiar with embedded development and familiar with Rust, but have not used Rust for embedded development.
134+
135+
[The Embedded Rust Book]: embedded-book/index.html

0 commit comments

Comments
 (0)