Open theduke opened 3 years ago
Thank you for your issue! However I'm afraid, there's not much that I can do. This more an issue with cargo
. See this issue for more information, I could probably restructure the project to remove the dependency from the library, however I'm not really sure it's worth it in terms of time or effort, have you noticed a meaningful compile time improvement if not compiled with clap
?
Making clap
an optional dependency might work, too.
Alternatively, the binary and the library could be split into separate packages.
I'd be willing to attempt restructuring the project into separate packages and submit a PR if @XAMPPRocky is okay with it.
Hmm, right now I still don't really the value in splitting the project up, I would think the energy would be better spent trying to push for [bin-dependencies]
or similar in Cargo.
Without restructuring the project, maybe defining the clap dependency as optional and being guarded by a "cli" feature that is enabled by default?
Like this when I import tokei I can disable most features and get rid of these unnecessary dependencies like clap?
Like this when I import tokei I can disable most features and get rid of these unnecessary dependencies like clap?
This should work, but I think you will have to use the new resolver for that.
Like this when I import tokei I can disable most features and get rid of these unnecessary dependencies like clap?
This should work, but I think you will have to use the new resolver for that.
I am, and its becoming default in the next edition coming very soon :)
When using tokei as a library, you still get
clap
as a dependency.Would be great to only use clap in the binary.