-
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
Basic work for cargo install #1967
Conversation
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
|
||
There are multiple methods of installing a new crate onto the system. The | ||
`cargo install` command with no arguments will install the current crate (as | ||
specifed by the current directory). Otherwise the `-p`, `--package`, `--git`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specifed
typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hehe, I copied straight from the RFC...
Hi Steve! I just so happen to be working with cargo internals recently too :) I'm not sure exactly what you're looking for examples of, but I have some guesses. Wow, there's a lot of options to this command!! If I were starting on implementing
I could also be totally wrong about this! Some other places to look:
Hope that helps!!!! |
target_rustc_args: None, | ||
}; | ||
|
||
let root = &Path::new("$HOME/.cargo/bin"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should actually be accessible through config.home().join("bin")
@carols10cents is also right on the money :) |
Why store the executables in $HOME rather than in /usr/local/bin? I prefer the latter. |
Please read the RFC for the answer to this.
|
Oh, sorry! |
Bump! |
Yeah, I haven't had the chance to keep working on this. If someone else On Sun, Oct 4, 2015 at 11:17 AM, Bogdan Cuza notifications@github.com
|
I guess I could address the issues pointed out by @alexcrichton |
@boghison oh I'm actually going to be starting work on |
@alexcrichton Oh, if you want to work on it, then I guess I shouldn't get in the way |
Continued in #2026, thanks @steveklabnik! |
As a sort of successor to #1318, and as an implementation of /~https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md , here's a starting skeleton for cargo install.
As someone not mega familiar with Cargo's internals, this is the point where stuff started to bog down a bit. As you can see, this is mostly getting the setup going, it doesn't work at all yet. Any pointers on where to look at Cargo to see examples of how to do the rest? I'll be poking around myself, but I figure I'd send a PR anyway.