Idea - Unified cargo command for workspace management

Suggestion -> A cargo command for workspace management.

For eg.

# Make new workspace
cargo workspace new/init

# Add crate to workspace
cargo workspace add crate_name 

# Optionally pass `--lib` for library crates

There have been multiple individual suggestions for commands to manage workspaces, I intended to unify workspace management with this suggestion to Cargo.

I'd be glad to contribute to Cargo regarding this if the suggestion is accepted nicely in the community =)

See also

cargo-workspaces seems pretty nifty, but workspace functionality added in the official cargo CLI might be better since workspaces are handled by cargo, not also by another tool.

cargo build, cargo test, etc work with individual crates and workspaces, why should new / init be any different?

I'd suggest exploring how we could extend the existing functionality with workspace support rather than bifurcating the cargo CLI experience.

See also

4 Likes

LGTM! It'd be lovely if those additions, especially the cargo new --workspace one gets more traction :purple_heart:

This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.