cargo doc --no-deps --all-features with RUSTDOCFLAGS=-D warnings. Catches
doctest / intra-doc-link breakage at MR time rather than at release. Sibling
of tofu-lint's terraform-docs-drift gate and
go-lint's godoc-equivalent (Go doesn't have a separate
gate — go vet catches most). Single job, MR-only by default, shares the
target/ cache with rust-test via the same
Cargo.lock-keyed key (pull-only — it runs in docs, after rust-test
already warmed it).
Shell snippet prepended to before_script (apt installs for native deps).
cache_prune_days
number
7
When the runner exports RUST_CACHE_DIR, the job builds in a target directory beneath it keyed by compiler (rustc -vV) and libc, and removes keyed directories no job has used for this many days. Give every Rust component in a project the same value. No effect without RUST_CACHE_DIR. Wiki spec 0106. A key last used before a newer key appeared goes after one idle day regardless (wiki spec 0119).
resource_group
string
"$CI_PROJECT_PATH_SLUG-rust-compile"
Serialises the compile-heavy cargo-doc job onto one project-scoped group (shared with rust-lint/rust-test). Project-scoped, never affects other projects.