Flag to not add a crate to a workspace when calling cargo new
#13871
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-init
Command-new
S-triage
Status: This issue is waiting on initial triage.
Problem
There should be a flag to instruct
cargo new
not to edit a workspace's rootCargo.toml
by appending the crrate to its workspace members.This PR partially addresses the issue but not entirely. One should be able to call cargo new without it editing the root's
Cago.toml
even if it has a workspace declaration.This the situation I am running into. I use spirv-builder at runtime to compile rust source code into spirv for hot reloading of shaders. I thus often run
cargo new
to initialize the shader crate. However, I am forced to delete it from the workspace members each time, because this crate won't be compiled under the regular cargo workflow. Having a flag to disable the feature would be useful.Proposed Solution
Add a flag that prevents
cargo new
from editing a workspace'sCargo.toml
Notes
No response
The text was updated successfully, but these errors were encountered: