Command line tool for viewing documentation

Hi, new Rustacean here, so please bear with me :slight_smile: Is there an equivalent of “go doc” command line utility for Rust ? I had a look at the awesome-rust list too, but couldn’t find a similar utility for Rust. Thanks in advance!

1 Like


If you want to show documentation for a specific crate you do cargo doc --open and it will generate and show the documentation for you.

I’m not sure if that is what you are asking for or the general Rust documentation?

godoc prints documentation as plain text to stdout.

I’m not aware of any analogous tool in the Rust ecosystem.

1 Like

Hi @emoon, i checked “cargo doc --open”. But as @BurntSushi said, i’m trying to view documentation about a specific Crate/Module/Function in the console screen. For instance:

go doc bufio

In the “Go land”, the above command prints the documentation for functions/structs/interfaces in “bufio” package to standard output.

I’m still exploring the standard library and common crates. A similar utility for Rust would be very useful for newcomers like me. Thanks.

I see.

I use a third-party tool for that purpose that includes the Rust documentation (and many other langs/APIs) and I have a key combo in my editor to lookup something. This isn’t likely exactly what you are looking for though.

1 Like

Thanks @emoon. I just came across this project on github:


Looks like it’s in alpha state, but might be useful for console users in the future.

1 Like

Docs are generated from source code. You might want to jump to definition to read docs.