You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, there's no way to re-export features of an optional dependency.
Take these crates:
rayon - only compiles on targets with threads
jpeg_decoder - has a default feature "rayon" to enable faster decoding where possible
image - has a default feature "jpeg" which enables the jpeg decoder
Now the first problem is that image has an unconditional dependency on rayon. This isn't great, but it should be possible to fix by re-exporting a "rayon" feature from image.
However this doesn't work, because the "rayon" feature would have to automatically include the "jpeg_decoder" dependency, even if the "jpeg" feature is not enabled.
There should be a way to enable a dependency or dependency feature based on an intersection of top-level features.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
As far as I can tell, there's no way to re-export features of an optional dependency.
Take these crates:
rayon - only compiles on targets with threads
jpeg_decoder - has a default feature "rayon" to enable faster decoding where possible
image - has a default feature "jpeg" which enables the jpeg decoder
Now the first problem is that
image
has an unconditional dependency on rayon. This isn't great, but it should be possible to fix by re-exporting a "rayon" feature fromimage
.However this doesn't work, because the "rayon" feature would have to automatically include the "jpeg_decoder" dependency, even if the "jpeg" feature is not enabled.
There should be a way to enable a dependency or dependency feature based on an intersection of top-level features.
The text was updated successfully, but these errors were encountered: