Unstable Feature
Unstable features are a way of adding new functionality where the API is not guaranteed to be stable. This includes:
- A new feature with a transition period to gather additional feedback.
- A working feature that still has some unresolved questions.
- A proof of concept.
How to Create an Unstable Feature
- Create a GitHub issue titled
Tracking unstable feature issuefor the new feature. - Link this issue to every pull request (PR) related to the feature.
- Add a feature flag to the
Cargo.tomlto gate the new feature, following the naming convention:unstable-<feature-name>. - Link the tracking issue to every task that contributes to the feature's stabilization.
Note: Feature gating ensures that unstable features are only enabled when explicitly requested, reducing the risk of accidental use in production.
Stabilization of an Unstable Feature
- Remove the feature gate from the code and
Cargo.tomlonce the feature is stable. - Close the tracking issue with the pull request that removes the feature gate.
- Increment the crate's minor version to reflect the new stable feature.