Skip to content

Lack of README.md in rust repository inner crates. #474

Closed

Description

@popzxc

Remark: this issue is more like a topic for discussion, than actual change request.

Description

Currently, most of crates in the rust repository don't have a personal README.md file.

There is a rustc-guide intended for developers, but it doesn't expose the purpose and the core moments of libraries.

Thus, a new developer has to dig in by himself.

Example scenario: developer decides to improve something in the compiler. He finds the module responsible for the feature he wants to enhance, and... that's it. Now he have to understand the whole module before he will be able to start working on it.

My proposal is the following:

Add a README.md to each crate (of course, not all at the same time) which will contain the following information:

  • Short overview of the purpose of the crate.
  • Core entry points (e.g., exposed public interfaces).
  • Short description of modules in the crate, if they are has significant logical meaning.
  • Optionally: some hints for developing in this module.
  • Optionally: list of persons who are responsible for this module, so developers will know who they should be requesting a review from.

With such a file, entry threshold will be much lower and (I believe) getting into rust development will become easier.

From my side, I can try to implement such a README.md for libtest (as I'm familiar with it).

Activity

  1. jonas-schievink commented on Oct 18, 2019

    @jonas-schievink
    Contributor

    Alternatively, such documentation could be written as a crate-level doc comment, which means it would show up in the rustc rustdoc output here.

  2. Mark-Simulacrum commented on Oct 18, 2019

    @Mark-Simulacrum
    Member

    I'm going to move this over to the rustc-guide repository, though I personally think it may make sense to just close this. I think we've found historically that READMEs for libraries get out of date really easily, so inline (crate level, module level, per function, etc.) doc comments are better (and we're happy to have those via PRs, or in rustc-guide etc).

  3. mark-i-m commented on Oct 21, 2019

    @mark-i-m
    Contributor

    Yep, I actually went around deleting readmes a while back. They were all extremely out of date. I think the info you are looking for should be largely in the documentation or in this guide.

    @spastorino perhaps we could start some sort of commenting initiative that seeks to add comments to the source?

  4. spastorino commented on Oct 21, 2019

    @spastorino
    Member

    @mark-i-m yeah, I like the idea and there are a lot of things to do. It's important to have them clear and prioritized. I think we should develop a good high level plan on what we want to accomplish.

    Maybe this is a topic for one of the next meetings?.

  5. popzxc commented on Oct 21, 2019

    @popzxc
    Author

    If help would be needed, feel free to involve me :)

  6. spastorino commented on Oct 21, 2019

    @spastorino
    Member

    If help would be needed, feel free to involve me :)

    maybe jump on Zulip https://rust-lang.zulipchat.com/#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide and we can talk there.

  7. added 3 commits that reference this issue on Oct 26, 2019
  8. rylev commented on Jul 4, 2021

    @rylev
    Contributor

    Triage: Closing. There are not READMEs for the individual crates by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions