link the cargo book into the bookshelf
This commit is contained in:
parent
623886f44c
commit
3b32a3a104
|
@ -136,7 +136,6 @@ impl Step for UnstableBook {
|
|||
pub struct CargoBook {
|
||||
target: Interned<String>,
|
||||
name: Interned<String>,
|
||||
src: Interned<PathBuf>,
|
||||
}
|
||||
|
||||
impl Step for CargoBook {
|
||||
|
@ -152,21 +151,25 @@ impl Step for CargoBook {
|
|||
run.builder.ensure(CargoBook {
|
||||
target: run.target,
|
||||
name: INTERNER.intern_str("cargo"),
|
||||
src: INTERNER.intern_path(PathBuf::from("src/tools/cargo/src/doc/book")),
|
||||
});
|
||||
}
|
||||
|
||||
fn run(self, builder: &Builder) {
|
||||
let build = builder.build;
|
||||
|
||||
let target = self.target;
|
||||
let name = self.name;
|
||||
let src = self.src;
|
||||
let src = PathBuf::from("src/tools/cargo/src/doc/book");
|
||||
|
||||
let out = build.doc_out(target);
|
||||
t!(fs::create_dir_all(&out));
|
||||
|
||||
let out = out.join(name);
|
||||
|
||||
println!("Cargo Book ({}) - {}", target, name);
|
||||
|
||||
let _ = fs::remove_dir_all(&out);
|
||||
|
||||
build.run(builder.tool_cmd(Tool::Rustbook)
|
||||
.arg("build")
|
||||
.arg(&src)
|
||||
|
|
|
@ -28,6 +28,7 @@ Rust provides a number of book-length sets of documentation, collectively
|
|||
nicknamed 'The Rust Bookshelf.'
|
||||
|
||||
* [The Rust Programming Language][book] teaches you how to program in Rust.
|
||||
* [The Cargo Book][cargo-book] is a guide to Cargo, Rust's build tool and dependency manager.
|
||||
* [The Unstable Book][unstable-book] has documentation for unstable features.
|
||||
* [The Rustonomicon][nomicon] is your guidebook to the dark arts of unsafe Rust.
|
||||
* [The Reference][ref] is not a formal spec, but is more detailed and comprehensive than the book.
|
||||
|
@ -53,4 +54,5 @@ before this policy was put into place. That work is being tracked
|
|||
[nomicon]: nomicon/index.html
|
||||
[unstable-book]: unstable-book/index.html
|
||||
[rustdoc-book]: rustdoc/index.html
|
||||
[cargo-book]: cargo/index.html
|
||||
|
||||
|
|
Loading…
Reference in New Issue