Skip to content

cargo new --bin[=NAME] should be allowed #5573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SoniEx2 opened this issue May 26, 2018 · 3 comments
Closed

cargo new --bin[=NAME] should be allowed #5573

SoniEx2 opened this issue May 26, 2018 · 3 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new

Comments

@SoniEx2
Copy link

SoniEx2 commented May 26, 2018

e.g. (assuming #5431 )

cargo new --lib --bin --bin=hello crate

crate/
|_ Cargo.toml
\_ src/
   |_ lib.rs
   |_ main.rs
   \_ bin/
      \_ hello.rs
@matklad matklad added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label May 27, 2018
@matklad
Copy link
Member

matklad commented May 27, 2018

Hm, this definitely escalates.

It might be a nice idea to implement this as an external subcommand, cargo new-target --bin=hello, which adds bin/lib/test etc to existing target.

@SoniEx2
Copy link
Author

SoniEx2 commented May 27, 2018

This would support both cargo new --lib --bin=crate crate and cargo new --lib --bin crate, is the idea.

@epage
Copy link
Contributor

epage commented Oct 23, 2023

Closing in favor of #5151

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-new
Projects
None yet
Development

No branches or pull requests

4 participants