rust-lang / rust-lang/rfcs

Dependents of Specific Items In a Crate

Open
#3,542 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Markdown
Stars
6.6k
Forks
1.7k
Avg merge
16h 14m
Merged PRs (30d)
1

Description

Current situation:
We are able to see a list of dependents of an entire crate via crates.io. We're also able to see minimalistic examples in the documentation of the item of interest.

Suggestion:
Add a feature that allows you to see the dependents of a specific item within a crate (rather than the entire crate).

Purpose:
Makes it easier to find existing implementation examples of the given item, so that the user can easily and conveniently learn how to correctly implement the item and make it work. The implementation examples would show the item's interaction with other code parts in a complex (and thus realistic) environment - which the minimalistic code examples in the item's documentation don't communicate.

Example:
https://docs.rs/axum/0.7.2/axum/struct.Extension.html
This struct has only minimalistic usage examples. But how would it look like in a larger context when it interacts with other code parts in a complex project? In order for me to find out, I'd have to go through all the dependents of the axum crate, go to their Github, and ctrl+F for Extension until I find a project that uses this item. This can be quite time-consuming. The proposed feature above should make this search for implementation examples more straightforward so that Rust crates in general will become easier to work with

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the crates.io dependents view and the docs.rs axum::Extension page to understand the existing crate-level and item-level experiences. Define the RFC's scope and acceptance criteria for finding dependents of one item, including how results are identified and presented; done means the proposal is specific enough for implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.