Skip to main content

Module doc

Module doc 

Source
Expand description

Documentation generation for bootstrap.

This module implements generation for all bits and pieces of documentation for the Rust project. This notably includes suites like the rust book, the nomicon, rust by example, standalone documentation, etc.

Everything here is basically just a shim around calling either rustbook or rustdoc.

Macrosยง

book ๐Ÿ”’
tool_doc ๐Ÿ”’

Structsยง

Bootstrap
BuildHelper
BuiltDocs
Output of a Doc step.
Cargo
CargoBook
Clippy
ClippyBook
CompilerWithTools
Generate the combined compiler + tools docs for a given toolchain. This contains both the compiler docs, docs of rustc_private tools (miri, clippy, etc.), cargo and also some bootstrap related tools (bootstrap itself, compiletest, tidy, etc.).
Compiletest
DocArtifacts ๐Ÿ”’
Stores generated documentation artifacts.
EditionGuide
EmbeddedBook
ErrorIndex
Miri
Nomicon
Reference
Documents the reference. It has to always be done using a stage 1+ compiler, because it references in-tree compiler/stdlib concepts.
Releases
RunMakeSupport
RustByExample
RustbookSrc ๐Ÿ”’
Rustc
Document the compiler for the given target using rustdoc from build_compiler.
RustcBook
Builds the Rust compiler book.
Rustdoc
RustdocBook
Rustfmt
SharedAssets
SharedAssetsPaths
Standalone
Std
Document the standard library using build_compiler.
StyleGuide
TheBook
Tidy
UnstableBook
UnstableBookGen
Runs the unstable-book-gen tool and returns a path to the generate unstable book markdown files.

Enumsยง

DocumentationFormat

Constantsยง

STD_PUBLIC_CRATES ๐Ÿ”’
Name of the crates that are visible to consumers of the standard library. Documentation for internal crates is handled by the rustc step, so internal crates will show up there.

Functionsยง

create_docs_and_gather_artifacts ๐Ÿ”’
Run cargo doc and gather generated documentation artifacts.
doc_std ๐Ÿ”’
Prepare a Cargo command for building the documentation for public standard library crates.
invoke_rustdoc ๐Ÿ”’
merge_host_and_target_docs ๐Ÿ”’
Merge host and target documentation for a set of crates. We pass --target when documenting, so Cargo will put the built documentation into two places:
merge_rustdoc_cci ๐Ÿ”’
Run rustdoc to merge cross-crate info metadata (like the search index) from individual executions of rustdoc into out_dir. The json_files parameter should contain paths to JSON file artifacts generated by previous executions of cargo doc.
normalize_doc_crate_name ๐Ÿ”’
Normalizes crate name to get a name that is used to generate documentation on disk. Turns rustc-main into rustc_main.
prepare_doc_compiler
Prepare a compiler that will be able to document something for target at stage.