Ideally serde-generate would provide an API that put dependencies behind different feature flags, so that not everything is required if only a small part of the crate is used.
Especially that includes the following dependencies:
structopt as that's not needed if serde-generate is used as dependency
bcs and bincode as sometimes you want to use one or the other
serde_yaml as it's not always required to build a yaml representation of the corresponding types
I'm not sure about other dependencies like textwrap, heck, serde_bytes, include_dir, maplit and phf.
Pitch
Describe the solution you'd like
Put parts of the API behind feature flags, so that users can choose what to use + what gate corresponding dependencies on these flags.
Describe alternatives you've considered
Do not change anything and pull in potentially unneeded dependencies.
Are you willing to open a pull request? (See CONTRIBUTING)
🚀 Feature Request
Motivation
cargo tree
currently reports the following dependencies forserde-generate
:Ideally
serde-generate
would provide an API that put dependencies behind different feature flags, so that not everything is required if only a small part of the crate is used.Especially that includes the following dependencies:
structopt
as that's not needed ifserde-generate
is used as dependencybcs
andbincode
as sometimes you want to use one or the otherserde_yaml
as it's not always required to build ayaml
representation of the corresponding typesI'm not sure about other dependencies like
textwrap
,heck
,serde_bytes
,include_dir
,maplit
andphf
.Pitch
Describe the solution you'd like Put parts of the API behind feature flags, so that users can choose what to use + what gate corresponding dependencies on these flags.
Describe alternatives you've considered
Do not change anything and pull in potentially unneeded dependencies.
Are you willing to open a pull request? (See CONTRIBUTING)
I would be willing to contribute a PR for that
Additional context