The rust analyzer manual uses mdbook.
To run the documentation site locally:
cargo install mdbook
cargo xtask codegen
cd docs/book
mdbook serve
# make changes to documentation files in doc/book/src
# ...
mdbook will rebuild the documentation as changes are made.
While not required, installing the mdbook binary can be helfpul in order to see the changes. Start with the mdbook User Guide to familiarize yourself with the tool.
Four sections are generated dynamically: assists, configuration, diagnostics and features. Their content is found in the generated.md
files
of the respective book section, for example src/configuration_generated.md
, and are included in the book via mdbook's
include functionality. Generated files can be rebuilt by running the various
test cases that generate them, or by simply running all of the rust-analyzer
tests with cargo test
and cargo xtask codegen
.