Add support for the workspace.metadata
key in Cargo.toml files
#8309
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Describe the problem you are trying to solve
External tools that work with Rust repositories often need metadata in order to apply user-configurable settings to different parts of that repository. For packages, the Cargo.toml key
package.metadata
has already been set aside for this purpose. The cargo project has promised to not use its contents to make any decisions for the base cargo tool, and has ensured that the tool will not report a warning for an unknown key for it.When the Cargo.toml file in question is used to define a package, this is sufficient. However, in the case that the Cargo.toml file is used as a workspace root, there is no equivalent key. It is common for a Rust repository to have a single Cargo.toml file at its root that does not itself declare a package. Thus external tools that operate on a workspace as a whole do not have any specified location to place their configuration data within this Cargo.toml file.
Describe the solution you'd like
We should support the
workspace.metadata
Cargo.toml key that mirrors the existingpackage.metadata
key. To my understanding, this means the following must hold.workspace.metadata
key in any semantically meaningful way.The text was updated successfully, but these errors were encountered: