rustdoc: add page (#10902)

* rustdoc: add page

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
pull/23/head
Fyodor Dostoevsky 2023-10-09 13:08:14 -05:00 committed by GitHub
parent c6ca17ba02
commit f6dcb78026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

20
pages/common/rustdoc.md Normal file
View File

@ -0,0 +1,20 @@
# 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}}`