imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

Make external dependencies optional

Open OrangeHoopla opened this issue 1 month ago • 2 comments

Made ab_glyph and rustdct optional and the respective modules they are being used in features. The only other dependency that doesn't span multiple modules is approx which would make geometric_transformations a feature if we wanted to make it optional. note: this will break other people's use of this library if they have the default-features set to false and are using either drawing::text or image_hash

OrangeHoopla avatar Nov 04 '25 19:11 OrangeHoopla

making DistanceFrom public isn't related to optional dependencies

cospectrum avatar Nov 24 '25 16:11 cospectrum

making DistanceFrom public isn't related to optional dependencies

My bad @cospectrum that was for another commit. I removed it.

OrangeHoopla avatar Dec 10 '25 21:12 OrangeHoopla

I started working on this and it causes a cascade of warnings if/when the feature is removed. Would you rather I go through add #[cfg(feature = "fft")] to all imports that are not being used when the feature is removed(a little ugly imo) or do we want someone to see warning when they remove this feature?(probably not the best thing either)

OrangeHoopla avatar Dec 22 '25 03:12 OrangeHoopla

Nvm I think a mixture of #[allow(dead_code)] would be the solution.

OrangeHoopla avatar Dec 22 '25 03:12 OrangeHoopla

I don't like unused imports. They still may slow down compile time I think. Lets put entire modules such that phash, signals, bits behind the feature

cospectrum avatar Dec 22 '25 09:12 cospectrum

1 thread is remaining. You can do it!

cospectrum avatar Dec 22 '25 13:12 cospectrum

...sorry about that I got pulled away from the computer for a bit.

OrangeHoopla avatar Dec 22 '25 14:12 OrangeHoopla