Just link necessary libraries
Just need to link necessary libraries.
No matter what feature I use, it will link all libraries, but this is not necessary. And it slow down program startup.
Hi, thanks for the PR! Unfortunately it's not that easy. OpenCV allows building in a configurations where there is only 1 dynamic library called opencv_world which contains the code for all enabled modules. But in your case, does specifying just OPENCV_LINK_LIBS environment variable not work? It should overwrite the list of libraries that would be linked. If it doesn't work maybe there is a bug in the build.rs.
OPENCV_LINK_LIBS may not be convenient. features may be very straightforward and convenient. Maybe my implementation is not very well yet. I think you can consider it.
I'm going to close this PR due to the reasons that this implementation won't work universally