-
Notifications
You must be signed in to change notification settings - Fork 38
Description
Several anstream crates currently require windows-sys 0.60.2 and don't allow 0.61 or newer. The 0.60 -> 0.61 bump is different from other bumps because 0.61 is the first version that uses the raw-dylib feature to have rustc generate the import library, instead of pulling in large pre-compiled import libraries via windows-targets. Usually people care more about avoiding multiple windows-sys versions and are happy to stay on older versions to achieve this, but now there's tangible advantages to preferring the newer version (avoiding pre-built blobs, smaller download size and vendor directory).
Bumping the windows-sys requirement from ^0.60.2 to ^0.61 would break MSRV (as discussed in #276). If this was just a matter of waiting N months until MSRV becomes 1.71 automatically, I'd just wait. But since there's no clear timeline, I don't want to wait indefinitely. For dependencies that are replaced by new std features, this is addressed by "polyfill" crates, but that doesn't seem applicable here.
Allowing both windows-sys 0.60 and 0.61 would resolve this without having to bump MSRV. Several other libraries with MSRV < 1.71 already do this (rustix, errno, tempfile, nu-ansi-term, is-terminal, os_pipe, jiff, ...). Allowing both 0.52 and 0.59 was previously rejected in #238 and I understand the reasons @epage gave. However, I think the trade-off is significantly different for 0.60 and 0.61:
- Due to MSRV, "just" updating to 0.61 and not supporting older versions is not an option for the foreseeable future (I'd be happy to be proven wrong about this)
- Staying on 0.60 only imposes a tangible cost on dependents with higher MSRV
- The only change in 0.61 is the switch to windows-link. That's only a breaking change for esoteric reasons which don't affect anstream. As long as there's nothing taking function pointers of windows-sys functions and expecting them to have a specific ABI string, there's no need to delicately avoid stepping on API differences between the two versions.