2023-10-08 11:20:48 +01:00
|
|
|
# cargo rustdoc
|
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
> Build the documentation of Rust packages.
|
|
|
|
> Similar to `cargo doc`, but you can pass options to `rustdoc`. See `rustdoc --help` for all available options.
|
2023-10-08 11:20:48 +01:00
|
|
|
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-rustdoc.html>.
|
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
- Pass options to `rustdoc`:
|
2023-10-08 11:20:48 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
`cargo rustdoc -- {{rustdoc_options}}`
|
2023-10-08 11:20:48 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
- Warn about a documentation lint:
|
2023-10-08 11:20:48 +01:00
|
|
|
|
2023-10-29 08:54:53 +00:00
|
|
|
`cargo rustdoc -- --warn rustdoc::{{lint_name}}`
|
|
|
|
|
|
|
|
- Ignore a documentation lint:
|
|
|
|
|
|
|
|
`cargo rustdoc -- --allow rustdoc::{{lint_name}}`
|
2023-10-08 11:20:48 +01:00
|
|
|
|
|
|
|
- Document the package's library:
|
|
|
|
|
|
|
|
`cargo rustdoc --lib`
|
|
|
|
|
|
|
|
- Document the specified binary:
|
|
|
|
|
|
|
|
`cargo rustdoc --bin {{name}}`
|
|
|
|
|
|
|
|
- Document the specified example:
|
|
|
|
|
|
|
|
`cargo rustdoc --example {{name}}`
|
|
|
|
|
|
|
|
- Document the specified integration test:
|
|
|
|
|
|
|
|
`cargo rustdoc --test {{name}}`
|