-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
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 existing package.metadata
key. To my understanding, this means the following must hold.
- The cargo tool must not use the
workspace.metadata
key in any semantically meaningful way. - The cargo tool must not impose any kind of explicit schema on the contents of that key.
- The cargo tool should not warn about the existence of that key.
Activity
workspace.metadata
table #8323Auto merge of #8323 - naerbnic:add_workspace_metadata_table, r=alexcr…