Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view rustdoc for a library my project depends on?

Tags:

rust

rustdoc

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.

like image 790
Daenyth Avatar asked Jul 06 '15 12:07

Daenyth


People also ask

What is rustdoc?

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.

What does cargo Doc do?

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.


1 Answers

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.

like image 51
Chris Morgan Avatar answered Sep 30 '22 13:09

Chris Morgan