-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[RFC] Naive local cargo-install #1318
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
Oooh, nice! I'm in favour of functionality like this. Possible additional discussion points:
|
To copy to e.g. |
5bca9b6
to
b0d4b2c
Compare
Certainly 👍 on |
dcc649b
to
9d2293a
Compare
Would the We don't want to reserve the |
This is not covered at the moment but can be added backwards compatible as this command could simply take the crate name as a possible argument to install something from crates.io. I definitely want to have that to but started with the local install as that is easier. |
9d2293a
to
c953a2c
Compare
Thanks for taking the initiative on this! I've definitely wanted functionality like this basically since the inception of Cargo! We've had a number of issues on this topic over time, and I definitely believe that this is quite a nuanced problem. We're currently taking the stability of the For example, I have some concerns here as well:
The list goes on as well I imagine, and there are many other community members who I'm sure would have quite an opinion on this as well :). I would probably personally recommend pursuing this not on this PR but rather through the discuss forum or perhaps and RFC issue (or RFC itself). This form of new subcommand is likely to be hotly desired and we want to make sure we cover all our bases! I'm not necessarily suggesting that this command needs to be 100% perfectly implemented just to land but rather that we need to be sure to design the command with all of these future use cases in mind. This may affect the choice of flags, for example, or perhaps influence some other decisions in other subcommands as well. How does that all sound? |
This adds a feature to install a compiled binary into a folder specified by --prefix, by default `~/.local/bin` (inspired by pipsi). This is mainly to start discussion if this is a desired feature. Lacking: * tests * missing error handling * (possibly) windows support
c953a2c
to
80a819d
Compare
☔ The latest upstream changes (presumably #1360) made this pull request unmergeable. Please resolve the merge conflicts. |
I'd say that'd be simply out-of-scope for naively installing arbitrary software
For this purpose, executables could stay in their target folders, and only be
Not sure if that'd be useful enough to implement (additional bookkeeping). Listing |
Crazy idea - not totally on topic for this PR, but in general:
Most of the kinds of users who would want to manually install Rust crates, however, likely already have some kind of package manager on their system. Linux users obviously almost universally have something; OS X power users usually have either Homebrew or MacPorts; I don't know how popular Chocolatey is on Windows, but it exists. Those users would probably appreciate being able to use their native package manager for Rust tools. Of course, relying on the distros themselves to package the tools is not good enough in a large number of cases, especially on Linux where users tend to run stable distros. And manually building packages for even a subset of those managers is a lot of work, c.f. the recent Reddit thread. The crazy idea, therefore, is to run that infrastructure on |
@comex I love the idea as well. Something I'd consider a prerequisite for this is
With 1) in place I'd already be a happy man. With 2) in fact everyone can build packages for software deployment on your own platform. This is the key feature here - I don't want to use 10 VMs to build the program and create deployment packages. Setting up a cloud-build-service that uses information of crates.io or another source will happen automatically, as it's a potential source for profit. If mozilla does it, even better, but external parties might have a shot at it earlier anyway. |
@comex, @Byron, I think the first step could be to teach The |
This PR is now out of date and needs a rebase. |
I'm closing this for now because of lack of time. If anyone wants to pick up on this feel free to take this piece of code or do what you want to. |
This adds a feature to install a compiled binary into a folder specified
by --prefix, by default
~/.local/bin
(inspired by pipsi, bike-shedding wanted).New config value
install.prefix
(bike-shedding wanted), for a default install path.This is mainly to start discussion if this is a desired feature.
Lacking: