I'd like to view the rust docs for a library that my program depends on. How can I pull these down? I found a question with the answer for the standard library but I'm looking specifically for crates.io dependencies.
What is rustdoc? The standard Rust distribution ships with a tool called rustdoc . Its job is to generate documentation for Rust projects. On a fundamental level, Rustdoc takes as an argument either a crate root or a Markdown file, and produces HTML, CSS, and JavaScript.
When no target selection options are given, cargo doc will document all binary and library targets of the selected package. The binary will be skipped if its name is the same as the lib target. Binaries are skipped if they have required-features that are missing.
Cargo does that automatically. For example, if I have hyper as a dependency, cargo doc
produces docs for it starting at target/doc/hyper/index.html
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With