-
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
Allow installing a package from outside a manifest #37
Comments
Can you say what workflow you would like for this? |
|
And then I can use |
That'd be #1318 |
Hey guys, I was pointed in this direction by Alex. There are a bunch of good ideas scattered around:
Needed for a comprehensive feature set (#1593):
Here is my attempt to an RFC.
[RFC] - Extended package management
[back-end] local repositoryTo make this possible we need some sort of local repository running on the machine. [command] cargo packageScope: This command only works from inside a cargo project. Possible packaging outputs include but are not limited to: deb, rpm, tar, zip, or installer (Windows).
Other considerationsWe need to consider architectures.
[command] cargo install [crate.io[version] | github-url]Scope: Works inside or outside a cargo project. When run from outside a cargo project the crate name or github-url is required. It will download the package or source, compile and install on the machine. When run inside a cargo project (and no crate arguments), it will compile and install that project in the machine. Other considerationsDo we want the outputs of Examples> cargo install foobar
foobar 0.1.2 installed (crates.io)
> foobar
Hello foobarians!
> cargo install /~https://github.com/example/repo-rs.git
repo 0.0.1 installed (/~https://github.com/example/repo-rs) [command] cargo view crate.ioScope: This command only works from inside a cargo project.
Examples> cargo view foobar
foobar 0.1.2 (0.3.7 is available)
| foo 0.0.3 (0.2.0 is available)
| bar 0.1.2 (0.1.8 is available)
> cargo view oops
oops not installed (0.1.0 is available)
> cargo view qwerty
qwerty crate does not exist [command] cargo listScope: This command is valid anywhere. The purpose is to know what packages are available on the computer. Other considerationsWe need to consider system wide + user local. Examples> cargo list
foobar 0.1.2 installed (0.3.7 is available)
repo 0.0.1 installed (/~https://github.com/example/repo-rs.git [behind 9 commits])
> cargo list --dependencies
foobar 0.1.2 installed (0.3.7 is available)
repo 0.0.1 installed (/~https://github.com/example/repo-rs.git [behind 9 commits])
The following crates are available as dependencies
foo 0.0.3 (0.2.0 is available)
bar 0.1.2 (0.1.8 is available) [command] cargo upgrade crateScope: This command is valid anywhere. The purpose is to upgrade a package to a newer version. Other considerationsIf the current version is a hard dependency for some other crate then we need to keep that copy around too.
Examples> cargo upgrade foobar
foobar 0.3.7 upgraded [command] cargo remove crateScope: This command is valid anywhere. The purpose is to remove an installed package. Other considerationsSimilar to upgrade, we need to be careful when this crate is a dependency to another crate. We also need to consider removing all the dependencies that are not primary installs unless they happen to be dependencies to some other installed crate. |
@icorderi wow, thanks for writing this up! For now major changes/additions to Cargo are going through the normal Rust RFC process, so I would recommend drafting up an RFC for that repo to gain comments on this. This is looking pretty good! Some hesitations that I've had in the past are:
Some of these questions I don't have great answers to, but they may want to be at least considered before pushing too hard on this. |
Consider /~https://github.com/cmr/hgl-rs/blob/master/.travis.yml. It installs
glfw-rs
manually just so it can be available when building the examples, but otherwise nothing depends on them.The text was updated successfully, but these errors were encountered: