mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
543 B
Plaintext
26 lines
543 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# rustdoc
|
|
|
|
> Generate documentation for a Rust crate.
|
|
> More information: <https://doc.rust-lang.org/stable/rustdoc/>.
|
|
|
|
- Generate documentation from the crate's root:
|
|
|
|
`rustdoc {{src/lib.rs}}`
|
|
|
|
- Pass a name for the project:
|
|
|
|
`rustdoc {{src/lib.rs}} --crate-name {{name}}`
|
|
|
|
- Generate documentation from Markdown files:
|
|
|
|
`rustdoc {{path/to/file.md}}`
|
|
|
|
- Specify the output directory:
|
|
|
|
`rustdoc {{src/lib.rs}} --out-dir {{path/to/output_directory}}`
|