I'm a bit new to Rust and ran into an issue where I'd like to make a feature of my crate that designates which features of a dependent crate should be included.
More specifically, I'm using the image-rs crate, which defines features for which image formats the library should support.
I'd like to have a feature of my crate that specifies to compile additional image format features of the image-rs crate. For example:
# Cargo.toml
[dependencies]
image = { version = "^0.23.6", features = ["png", "jpeg"] }
[features]
# I dont know the syntax to include image in my feature with specific image crate featres.
extra-image-formats = [ "image {features = [jpeg, png, gif, webp]}" ]
Is this supported? It would be nice; I hoped to have the default include commonly used image formats from the image-rs crate, but opt-in for more image formats (at the cost of a larger binary and longer compile due to all the extra decoders and encoders).
Thanks in advance!