1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 01:22:08 +02:00
tldr/pages/common/cargo-rustdoc.md
Omnath Mandal f6148d7cba
cargo-rustdoc: add page (#10828)
* cargo-rustdoc: add page

---------

Co-authored-by: pixel <pixel+github@chrissx.de>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-10-08 15:50:48 +05:30

598 B

cargo rustdoc

Generate documentation for the Rust package. More information: https://doc.rust-lang.org/cargo/commands/cargo-rustdoc.html.

  • Open the documentation in the browser:

cargo rustdoc --open

  • Specify the package to document:

cargo rustdoc --package {{spec}}

  • 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}}

  • Display help:

cargo rustdoc --help