Description
gitlab and crates.io both like to render the toplevel README
(normally for a Rust crate, README.md
). rustdoc formats crate-level documentation in src/lib.rs
.
The result is that for many crates, the README
contains very useful documentation not replicated in the rustdoc. For example, an introduction, or usage notes.
But, anomalously, that information is not shown at docs.rs and nor is included in rustdoc output.
This is confusing, because it means that when browsing crates online, the link in crates.io to "documentation" goes to a site which somehow doesn't have the documentation one was just looking at!
And it is a serious nuisance if one is using cargo doc to generate a documentation set for working offline: the resulting documentation is missing important parts.
I found #44732 and #66249 which seem to be related. In this issue I'm asking that README.md
should be processed by default, and put somewhere prominent in the rustdoc output.