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

Separate the bin and lib targets #19

Closed mmstick closed 3 years ago

mmstick commented 3 years ago

Saw some people griping that the Rust website is doing a disservice to Rust as a systems programming language because the example on the Getting Started section imports this crate, which fetches 98 MB of 25 different dependencies to build a "Hello World" app. For a result that can be achieved in every other programming language without dependencies. Most of those are coming from the Clap crate, which is only used by the binary. So splitting the library to a different Cargo workspace should stop the complaints.

mgattozzi commented 3 years ago

I've got a change I plan to merge and release today as a minor release that should make things better. Since the website also says to use only 0.2 this should make sure everything just works for new people. Turns out error-chain was the other dep that could be removed. I did a cursory look and this dropped the deps down from 22 to just 4 deps only 1 of which is a transient dependency. Hopefully this should alleviate issues with the size of deps being downloaded. Feel free to let whoever know that was griping about this that it's fixed.

Thanks for bringing up that this was indeed an issue causing a bit of an image problem for the community.

mgattozzi commented 3 years ago

New version has been released: https://crates.io/crates/ferris-says

I'll need to work on a new release that will update it to 2018 standards and will probably just make that a 1.0 as the crate has no real need to change the API at this point in time really.