Skip to content

Make package.name optional #12689

Open
Open
@epage

Description

@epage

Problem

The primary motivation for this is to close the gap between Cargo.toml and the cargo script experiment (#12207).

For Cargo.toml, package.name is required

For "cargo script", package.name is defaulted to a slug of the file stem.

Proposed Solution

Like with #9829, making this field optional would reduce the specialized documentation around "cargo script". The default for Cargo.toml would be a slug of the parent directory.

Notes

I think there are some other concrete cases that could potentially benefit from this, like rust-lang/rfcs#3452 though I overall see this rarely being relied upon.

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-needs-team-inputStatus: Needs input from team on whether/how to proceed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions