How can I build documentation for the compiler? (not for the standard library or for CLI, but for the compiler internals of rustc!)


I’m currently writing a compiler plugin and I would like to have documentation of rustc libraries offline. I downloaded the repo from rust-lang/rust and executed ./ doc. But in the directory build/<target>/ I see nothing related to rustc docs. There is a directory compiler-doc but it is empty. How do I build the docs for rustc libraries? (prefer all at onc)


Have you set compiler-docs to true in config.toml?


It worked now. Oh boy, if i knew it was so simple… Thanks!


@brunoczim, you can also view the internal compiler docs online. From memory they’re generated from the latest nightly.