This replaces the windows-sys dependency with manual bindings to only the functions, types, and constants needed by parking_lot.
Rationale
parking_lot is a foundational dependency, and thus its choice of dependencies has a fairly wide effect on the ecosystem since it's almost inevitable that even a moderately sized dependency graph will pull it in. This is particularly true due the problematic issue I pointed out in https://github.com/microsoft/windows-rs/issues/1720, in which I actually used parking_lot as an example due to its foundational nature. Using bindings in the few places they are needed means we can completely get rid of the windows-sys dependency, positively impacting a huge part of the crates ecosystem with no negatives.
Win32 functions/types/constants will never change, there is no reason to use an external crate of bindings
parking_lot_core already has manual bindings to Nt* functions since they are not officially supported by Microsoft and thus not part of the Win32 metadata used to generate the windows-sys bindings.
This replaces the
windows-sys
dependency with manual bindings to only the functions, types, and constants needed byparking_lot
.Rationale
parking_lot
is a foundational dependency, and thus its choice of dependencies has a fairly wide effect on the ecosystem since it's almost inevitable that even a moderately sized dependency graph will pull it in. This is particularly true due the problematic issue I pointed out in https://github.com/microsoft/windows-rs/issues/1720, in which I actually used parking_lot as an example due to its foundational nature. Using bindings in the few places they are needed means we can completely get rid of thewindows-sys
dependency, positively impacting a huge part of the crates ecosystem with no negatives.parking_lot_core
already has manual bindings toNt*
functions since they are not officially supported by Microsoft and thus not part of the Win32 metadata used to generate the windows-sys bindings.See #332 for a related open issue, and https://github.com/Amanieu/parking_lot/pull/334#issuecomment-1083340661