rust-lang / ferris-says

A Rust flavored implementation of `cowsay`
https://crates.io/crates/ferris-says
Apache License 2.0
194 stars 34 forks source link

Demonstration for supporting `bin target` fsays #23

Closed cromulentbanana closed 3 years ago

cromulentbanana commented 3 years ago

Hi! I'd love to be able to intall fsays using cargo but...

I'm struggling to understand whether there is a way to install the fsays binary using cargo install --bin. At first glance in the Cargo Book it seems that there might be a way to do it with cargo install ferris-says --bin fsays but that fails because there is not a bin target named fsays.

❯❯ cargo install ferris-says --bin fsays
    Updating crates.io index
  Installing ferris-says v0.2.1
error: failed to compile `ferris-says v0.2.1`, intermediate artifacts can be found at `/home/dlevin/nobackup/cargo`

Caused by:
  no bin target named `fsays`

To your knowledge, is this the right way to go about supporting cargo install for fsays?

Alternately, if there's no way to achieve installing fsays using cargo install I'd be happy to update the README with a sentence or two explaining that the user must clone the git repo and invoke cargo install --path . or something like that.

cromulentbanana commented 3 years ago

hi @mgattozzi -- I realize that build/tests fail on this PR, but perhaps you can understand what I'm trying to achieve here and if so, provide some guidance.

Thanks in advance!

mgattozzi commented 3 years ago

@cryptobanana you did nothing wrong! I had just never uploaded the binary version to crates.io I just uploaded it so you should be able to install it with cargo install fsays now!

mgattozzi commented 3 years ago

I forgot to close this PR since the issue was resolved! Going to do that now.