Skip to content
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

Turn cargo into a library-only crate, and move the binary part to rustc #5682

Closed
infinity0 opened this issue Jul 4, 2018 · 2 comments
Closed
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@infinity0
Copy link
Contributor

infinity0 commented Jul 4, 2018

I just noticed #5083 and have an alternative suggestion:

  • Turn cargo into a library-only crate with an unstable 0.x version.
  • Move cargo-the-binary into the rustc repo and share its stable 1.y version.

Now there is quite a lot of code in src/bin but that could be moved to src/lib/bin or something, so cargo-the-binary only has to be a very thin wrapper around it. (On second thoughts, perhaps it's better to simply move this to rustc so that the stability of it is easier to track and keep in line with rustc.)

The unstable cargo version should still be available on cargo --version --verbose though.

@infinity0
Copy link
Contributor Author

I'd also very much support upgrading cargo-the-binary to a first-class part of rustc, i.e. keep it in src and not src/tools and remove all logic about installing it "optionally". After all the version numbers are the same now, they are logically part of the same package. It would also improve the bootstrapping situation for distros, since we then only have a single package that needs to be bootstrapped rather than two that depend on each other in a cycle.

@alexcrichton alexcrichton added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Jul 5, 2018
@ehuss
Copy link
Contributor

ehuss commented Apr 6, 2020

I think it is unlikely that we'll make a change like this, although perhaps I don't fully understand the motivation. It doesn't seem to matter too much where the fn main() lives.

@ehuss ehuss closed this as completed Apr 6, 2020
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`
Projects
None yet
Development

No branches or pull requests

3 participants