Skip to content

stable/unstable/nightly-only features #10881

@ehuss

Description

@ehuss

Some packages have features that they intend to be "unstable" in that they enable functionality that may change over time, or may even be removed. Closely related to this are features that enable nightly-only functionality (see nightly-only features). I'm not sure if these two are distinct enough to consider separately, though they seem pretty similar to me.

Currently the documentation just recommends clearly documenting which features are unstable. However, that does not provide very good assurances that users know what they are opting into.

I don't know what would be a good way to make it clear that one is opting into an unstable feature. Another consideration is to possibly deny the use of unstable features.

Possible syntax may look like:

[features.foobar]
unstable = true

One thing to consider is the possible confusion of the term "unstable features" with Cargo's own Unstable Features. I'm not sure what terminology would be best here.

I'm opening this issue to track this feature request, but this isn't something we will likely pursue in the near term. This will require an RFC to explore the design in more detail.

See also:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-featuresArea: features — conditional compilationC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-rfcStatus: Needs an RFC to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions