Replace windows-sys dependency with generated bindings
This avoids the substantial churn and large downloads from the windows-sys dependency in favor of generating checked in code using the windows-bindgen crate (which ultimately also generates the windows-sys code).
I've used a similar setup successfully in chrono, and it's generally pretty low maintenance.
Thanks. This looks cool and interesting but harder to maintain. Currently, I'm not a fan of doing it this way.
Thanks. This looks cool and interesting but harder to maintain. Currently, I'm not a fan of doing it this way.
It does shift some complexity from your downstream users to the maintainers. Why specifically do you think it's harder to maintain?
Why specifically do you think it's harder to maintain?
Because, to me, it seems more like a hack around the cargo pkg mgmt system that requires a separate level of knowledge of how this works. Also, I'm not sure how we guarantee MSRV by doing this.
Why specifically do you think it's harder to maintain?
Because, to me, it seems more like a hack around the cargo pkg mgmt system that requires a separate level of knowledge of how this works.
All of the knowledge is more or less in the code generation test I posted.
Also, I'm not sure how we guarantee MSRV by doing this.
The normal way? The generated code is checked in so it's subject to your normal CI workflows. windows-bindgen itself is only a dev-dependency so there's no need for it to affect your MSRV.