From 606e5e07f6bf73297472c41a181672133bf21f16 Mon Sep 17 00:00:00 2001 From: James Munns Date: Sat, 19 Jan 2019 04:52:39 +0100 Subject: [PATCH 1/2] Add embedded book --- .gitmodules | 3 +++ src/bootstrap/builder.rs | 1 + src/bootstrap/doc.rs | 5 +---- src/ci/docker/x86_64-gnu-tools/checktools.sh | 1 + src/doc/embedded-book | 1 + src/doc/index.md | 16 ++++++++++++++++ 6 files changed, 23 insertions(+), 4 deletions(-) create mode 160000 src/doc/embedded-book diff --git a/.gitmodules b/.gitmodules index 4e368c3ebafd8..d603e4575159d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -44,3 +44,6 @@ path = src/llvm-project url = https://github.com/rust-lang/llvm-project.git branch = rustc/8.0-2019-01-16 +[submodule "src/doc/embedded-book"] + path = src/doc/embedded-book + url = https://github.com/rust-embedded/book.git \ No newline at end of file diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 716774632a01c..b0d15e6a5df5f 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -430,6 +430,7 @@ impl<'a> Builder<'a> { doc::RustByExample, doc::RustcBook, doc::CargoBook, + doc::EmbeddedBook, doc::EditionGuide, ), Kind::Dist => describe!( diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index 08e97396fd68b..f1d8fca71cdf7 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -61,6 +61,7 @@ macro_rules! book { // adding a build step in `src/bootstrap/builder.rs`! book!( EditionGuide, "src/doc/edition-guide", "edition-guide", RustbookVersion::MdBook1; + EmbeddedBook, "src/doc/embedded-book", "embedded-book", RustbookVersion::MdBook2; Nomicon, "src/doc/nomicon", "nomicon", RustbookVersion::MdBook1; Reference, "src/doc/reference", "reference", RustbookVersion::MdBook1; RustByExample, "src/doc/rust-by-example", "rust-by-example", RustbookVersion::MdBook1; @@ -71,10 +72,6 @@ book!( #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] enum RustbookVersion { MdBook1, - - /// Note: Currently no books use mdBook v2, but we want the option - /// to be available - #[allow(dead_code)] MdBook2, } diff --git a/src/ci/docker/x86_64-gnu-tools/checktools.sh b/src/ci/docker/x86_64-gnu-tools/checktools.sh index 2e5b335950166..3343716419ff4 100755 --- a/src/ci/docker/x86_64-gnu-tools/checktools.sh +++ b/src/ci/docker/x86_64-gnu-tools/checktools.sh @@ -23,6 +23,7 @@ python2.7 "$X_PY" test --no-fail-fast \ src/doc/nomicon \ src/doc/reference \ src/doc/rust-by-example \ + src/doc/embedded-book \ src/tools/clippy \ src/tools/rls \ src/tools/rustfmt \ diff --git a/src/doc/embedded-book b/src/doc/embedded-book new file mode 160000 index 0000000000000..36bc507044a95 --- /dev/null +++ b/src/doc/embedded-book @@ -0,0 +1 @@ +Subproject commit 36bc507044a9596df426e67e2e1685a3ed6e3c60 diff --git a/src/doc/index.md b/src/doc/index.md index 7bd1854d86f40..7a240ac0a42a5 100644 --- a/src/doc/index.md +++ b/src/doc/index.md @@ -117,3 +117,19 @@ Rust. It's also sometimes called "the 'nomicon." [The `rustc` Guide](https://rust-lang.github.io/rustc-guide/) documents how the compiler works and how to contribute to it. This is useful if you want to build or modify the Rust compiler from source (e.g. to target something non-standard). + +# Specialize Rust + +When using Rust in specific domain areas, consider using the following resources tailored to each domain. + +## Embedded Systems + +When developing for Bare Metal or Embedded Linux systems, you may find these resources maintained by the [Embedded Working Group] useful. + +[Embedded Working Group]: https://github.com/rust-embedded + +### The Embedded Rust Book + +[The Embedded Rust Book] is targeted at developers familiar with embedded development and familiar with Rust, but have not used Rust for embedded development. + +[The Embedded Rust Book]: embedded-book/index.html From 4633cca157d9730d75e3fc6144ae952b76f5559f Mon Sep 17 00:00:00 2001 From: James Munns Date: Mon, 4 Feb 2019 11:34:50 +0100 Subject: [PATCH 2/2] Update embedded book dependency --- src/doc/embedded-book | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/embedded-book b/src/doc/embedded-book index 36bc507044a95..d663113d1d9fb 160000 --- a/src/doc/embedded-book +++ b/src/doc/embedded-book @@ -1 +1 @@ -Subproject commit 36bc507044a9596df426e67e2e1685a3ed6e3c60 +Subproject commit d663113d1d9fbd35f1145c29f6080a6350b7f419