-
Notifications
You must be signed in to change notification settings - Fork 575
Description
Suggestion
Rust 1.71 fully stabilized the raw-dylib
feature. Currently, windows-targets
will only use this feature when the windows_raw_dylib
build flag is set, but I suspect most consumers of windows-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 uses windows-targets
. Ideally, linking would always be done through raw-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.