-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(quinn-udp): support both windows-sys v0.52 and v0.59 #2021
Conversation
`quinn-udp` depends on the `windows-sys` crate, more specifically `windows_sys::Win32::Networking::WinSock`: https://github.com/quinn-rs/quinn/blob/a5d9bd1154b7644ff22b75191a89db9687546fdb/quinn-udp/src/cmsg/windows.rs#L6 https://github.com/quinn-rs/quinn/blob/a5d9bd1154b7644ff22b75191a89db9687546fdb/quinn-udp/src/windows.rs#L13 Previously `quinn-udp` was using `windows-sys` `v0.52`. quinn-rs#1960 updated `quinn-udp` to `v0.59`. Note that `windows-sys` went straight from `v0.52` to `v0.59`. There are no versions in between. `quinn-udp` does not depend on any `windows-sys` `v0.59` features. In other words, it can support both `windows-sys` `v0.52` and `v0.59`. https://github.com/microsoft/windows-rs/releases/tag/0.59.0 This commit allows downstream users of `quinn-udp` to explicitly use `quinn-udp` with `windows-sys` `v0.52`. For other users not explicitly demanding `windows-sys` `v0.52`, cargo will choose `windows-sys` `v0.59`: > It also attempts to use the greatest version currently available within that compatibility range. https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. I still also like the solution of pregenerating bindings using windows-bindgen, which would sidestep these issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Theoretically significant risk of bitrot here without CI coverage, but I don't expect our use of windows-sys will change meaningfully for the foreseeable future.
Thank you for the very quick help here @djc and @Ralith!
I don't have enough experience with
Agreed! (At least, once in Firefox, the latest release will be tested a couple million times per day :P ) |
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case mozilla#2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`.
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`.
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`.
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`.
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`. Co-authored-by: Lars Eggert <[email protected]>
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`. Co-authored-by: Lars Eggert <[email protected]>
Currently we use `quinn-udp` `v0.5.4`. `quinn-udp` `v0.5.5` fixes [`recvmmsg` calls on Android x86](quinn-rs/quinn#1966). `quinn-udp` `v0.5.6` adds [experimental multi-message support on Apple platforms](quinn-rs/quinn#1993) and [fixes an unnecessary `windows-sys` version restriction](quinn-rs/quinn#2021). While not strictly necessary, given that our current version specification (i.e. `version = "0.5.4"`) already allows users to use Neqo with `quinn-udp` `v0.5.6`, this commit updates to `quinn-udp` `v0.5.6` anyways, thus making sure CI tests with latest version. In case #2208 lands, future compatible version updates would touch the `Cargo.lock` file, not `Cargo.toml`. Co-authored-by: Lars Eggert <[email protected]>
quinn-udp
depends on thewindows-sys
crate, more specificallywindows_sys::Win32::Networking::WinSock
:quinn/quinn-udp/src/cmsg/windows.rs
Line 6 in a5d9bd1
quinn/quinn-udp/src/windows.rs
Line 13 in a5d9bd1
Previously
quinn-udp
was usingwindows-sys
v0.52
. #1960 updatedquinn-udp
tov0.59
. Note thatwindows-sys
went straight fromv0.52
tov0.59
. There are no versions in between.quinn-udp
does not depend on anywindows-sys
v0.59
features. In other words, it can support bothwindows-sys
v0.52
andv0.59
.https://github.com/microsoft/windows-rs/releases/tag/0.59.0
This commit allows downstream users of
quinn-udp
to explicitly usequinn-udp
withwindows-sys
v0.52
.For other users not explicitly demanding
windows-sys
v0.52
, cargo will choosewindows-sys
v0.59
:https://doc.rust-lang.org/cargo/reference/resolver.html#semver-compatibility
Additional context:
windows-sys
v0.52.0
.windows-sys
v0.59
is a large undertaking. E.g.socket2
exposeswindows-sys
in its public interface, thus upgrading towindows-sys
v0.59
is a breaking change, see Bumpingwindows-sys
is a Semver breaking change rust-lang/socket2#526.quinn-udp
supportingwindows-sys
v0.52
ANDv0.59
allows Firefox to usequinn-udp
v0.5.5
today already and thus make use of e.g. Revert "Implement fallback forsendmmsg
andrecvmmsg
" #1966.Note that the ask is to support
windows-sys
v0.52
only whilequinn-udp
does not depend on anywindows-sys
features>= v0.59
. As soon asquinn-udp
needs anywindows-sys
>=v0.59
features, it should naturally dropwindows-sys
v0.52
support.