clifflecliffle@hachyderm.io
Aug 1, 2026, 4:45 PMSometimes I wish #rustlang would let me specify additional dependencies for the bin-side of a crate.
I often write a library and want to provide some sort of binary tool along with it -- but that tool needs a bunch of deps that the library itself doesn't need. The current options are
- Make the tool an "example" and put the extra deps in the dev-dependencies section -- poor user experience, IMO, and cannot cargo-install
- Put the tool in a separate crate, which adds a bunch of boilerplate and filesystem indirection.
(Note: there is a Cargo feature called "bin-deps" that is not this.)