Add --workspace
to cargo add
#13915
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
I am working on a project where we're placing all dependencies in the workspace. Whenever I add a new dependency I want to be able to add it to the workspace rather than the local
Cargo.toml
file.Proposed Solution
The command
Should add
tokio
to the the currentCargo.toml
like so:And to the workspace
Cargo.toml
:To find the workspace file, the command would go up the directories looking for
Cargo.toml
wheremembers
contains the current package.Additionally, the
--workspace
flag could take a parameter with the workspaceCargo.toml
's path.Notes
If the feature is to be implemented, I am available to do it!
The text was updated successfully, but these errors were encountered: