Skip to content

rustdoc: Please process top-level README by default #76966

Open
@ijackson

Description

@ijackson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions