Auto update workspace.members when running cargo init within a parent crate #6906
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
It's cumbersome and error prone authoring a multi crate project when you run cargo init inside a multi crate project and need to manually wire up workspace.members in the parent crate's Cargo.toml. That's even if you know you're supposed to to this.
When you run cargo commands in the parent project without doing this you may be surprised when they aren't applied to the new child project.
Describe the solution you'd like
An ideal solution would be for cargo init to detect where its being run and auto update the list of workspace.members in the crate its being run within. This makes doing right thing transparent for users easy and transparent.
Notes
Until rustc becomes fast for larger code bases splitting up crates into smaller crates is really the best option we have. Cargo should make that option as easy and straightforward as it can be.
The text was updated successfully, but these errors were encountered: