Skip to content

authors-file package field #14949

@timmypidashev

Description

@timmypidashev

Problem

Hello 👋

I am building some rust software, and couldn't find a package field that allows for mentioning/referencing an AUTHORS file in the authors field. This is unfortunate, as I already make use of a non-standard license, and the license-file field came in very handy. I assumed something like authors-file should also exist, but alas.

When a project sees multiple contributions, It is not feasible to keep track of them all in a authors list, nor is it expandable. It would be nice to have a field where we can pass in a markdown or text file with a list of maintainers/contributors, and have cargo fetch that into its package metadata.

Proposed Solution

I propose adding an authors-file field to Cargo.toml that works similarly to the existing license-file field. Here's how it would work:

[package/workspace.package]
authors-file = "AUTHORS"

The AUTHORS file would support categorization through comments, with lines starting with # being used as category headers:

# Core Team
Your Name <your.email@example.com>

# Contributors
Another Author <another.email@example.com>

Additionally, we should provide support for GitHub's CONTRIBUTORS file format, allowing markdown formatting while extracting just the relevant contributor information.

Notes

This is my first potential contribution to the Rust ecosystem, and I'm really excited about it! It follows the precedent set by license-file and provides a more scalable alternative compared to listing authors directly in Cargo.toml.

I'd love to hear what others think and if its a good idea, I'd love to submit a pull request. Looking forward to getting involved with the Rust community through this feature! 😊

Activity

added
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triageStatus: This issue is waiting on initial triage.
on Dec 17, 2024
changed the title [-]Feature request: `authors-file` package field[/-] [+]authors-file` package field[/+] on Dec 17, 2024
changed the title [-]authors-file` package field[/-] [+]`authors-file` package field[/+] on Dec 17, 2024
epage

epage commented on Dec 17, 2024

@epage
Contributor

package.authors used to be required and then it was made optional and de-emphasized / hidden in official tooling, see rust-lang/rfcs#3052

In that context, I'm not really seeing us making use of a package.authors-file in a meaningful way that having built-in support, especially designing out something semi-structured, would be worth it.

timmypidashev

timmypidashev commented on Dec 17, 2024

@timmypidashev
Author

Thanks for the reply. That makes a lot more sense, and seeing as it's not even a requirement means anyone who is in need can simply default to using a CONTRIBUTORS file or the like. I will drop the issue 👍

added a commit that references this issue on Jan 15, 2025
added a commit that references this issue on Jan 15, 2025
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

    A-manifestArea: Cargo.toml issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @epage@timmypidashev

        Issue actions

          `authors-file` package field · Issue #14949 · rust-lang/cargo