#[SOLVED] Library & Binary different deps

2 messages · Page 1 of 1 (latest)

simple portal
#

Hi,
if have a binary that provides small functionality and that I want to publish. I also want a binary that exposes the library functionality to the CLI.
Thereby the binary obv requires a lot of extra dependencies.
Is there any way to have different dependencies per library / binary without having two different workspaces as both the lib and bin are single files?

hushed niche
#

You could put all of the CLI dependencies behind a 'cli' feature flag (using optional deps). I think there's a way to indicate that a bin needs certain features from its own crate