Skip to content

Conversation

@steveklabnik
Copy link
Contributor

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.

@rust-highfive
Copy link

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifed

typo

Copy link
Contributor Author

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...

@huonw
Copy link
Contributor

huonw commented Sep 6, 2015

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned huonw Sep 6, 2015
@carols10cents
Copy link
Member

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 cargo install -p [crate to install from crates.io], I'd probably:

I could also be totally wrong about this! Some other places to look:

  • When cargo is reading a Cargo.toml, there's logic around creating a SourceId from git or from the central repo, but in order to reuse that, you'd have to create TOML from the arguments and that seems like going backwards, so maybe that logic could be extracted somewhere shared?
  • Dependency also has some parse logic, but that feels weird because the thing you're cargo installing isn't a dependency of anything

Hope that helps!!!!

Copy link
Member

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")

@alexcrichton
Copy link
Member

@carols10cents is also right on the money :)

@ticki
Copy link

ticki commented Sep 9, 2015

Why store the executables in $HOME rather than in /usr/local/bin? I prefer the latter.

@steveklabnik
Copy link
Contributor Author

Please read the RFC for the answer to this.

On Sep 9, 2015, at 08:01, Ticki [email protected] wrote:

Why store the executables in $HOME rather than in /usr/local/bin? I prefer the latter.


Reply to this email directly or view it on GitHub.

@ticki
Copy link

ticki commented Sep 9, 2015

Oh, sorry!

@cuzbog
Copy link

cuzbog commented Oct 4, 2015

Bump!

@steveklabnik
Copy link
Contributor Author

Yeah, I haven't had the chance to keep working on this. If someone else
wants to work on it, feel free, I will not be mad.

On Sun, Oct 4, 2015 at 11:17 AM, Bogdan Cuza [email protected]
wrote:

Bump!


Reply to this email directly or view it on GitHub
#1967 (comment).

@cuzbog
Copy link

cuzbog commented Oct 4, 2015

I guess I could address the issues pointed out by @alexcrichton

@alexcrichton
Copy link
Member

@boghison oh I'm actually going to be starting work on cargo install pretty soon (this coming week or so), so there should be movement on this quite soon!

@cuzbog
Copy link

cuzbog commented Oct 4, 2015

@alexcrichton Oh, if you want to work on it, then I guess I shouldn't get in the way

@alexcrichton
Copy link
Member

Continued in #2026, thanks @steveklabnik!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants