Allow windows-targets
to use the raw-dylib
feature on newer rust versions by default
#3494
Labels
question
Further information is requested
Suggestion
Rust 1.71 fully stabilized the
raw-dylib
feature. Currently,windows-targets
will only use this feature when thewindows_raw_dylib
build flag is set, but I suspect most consumers ofwindows-targets
are using downstream crates and are probably never going to go through the docs to see that this flag should be set on systems with newer rust versions. And it's not realistic to expect them to, I only happened to discover this behavior after stumbling across a random closed issue in a crate that useswindows-targets
. Ideally, linking would always be done throughraw-dylib
when any rustc version supporting it is available.My understanding is that this should be trivial to do with a simple build script to enable
windows_raw_dylib
when the rustc version is new enough. This would increase the work cargo has to do, but would also remove the need for linking against the provided static libraries, which should be a net win in compile times and binary sizes.If this were to be done, would there be a need to provide some other config flag for users to disable the use of
raw-dylib
? Or is it generally better to use it if it's available? Maybe there's a benefit to bringing in the libraries that I'm unaware of.The text was updated successfully, but these errors were encountered: