mdbook-spec
mdbook-spec is an mdBook preprocessor that adds features to the Reference. It provides:
- Parsing and generation of grammar diagrams.
- Automatic grammar production links.
- Generation of the grammar summary appendix.
- Automatic standard library links.
- Handling of rule names.
- Validation of the names.
- Converting rule names to links.
- Automatic rule link references.
- Generation of links to rule tests.
- Generation of the test summary.
- Support for admonitions.
Environment variables
There are a few environment variables that mdbook-spec uses, described in Building the Reference:
SPEC_RELATIVE— Can be set to link external books to the live site.SPEC_DENY_WARNINGS— Whether warnings should be treated as errors.SPEC_RUST_ROOT— The path to a checkout of therust-lang/rustGitHub repository. This is used for test linking.