Skip to content

Conversation

djc
Copy link

@djc djc commented Sep 28, 2025

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.

@fdncred
Copy link

fdncred commented Sep 28, 2025

Thanks. This looks cool and interesting but harder to maintain. Currently, I'm not a fan of doing it this way.

@djc
Copy link
Author

djc commented Sep 28, 2025

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?

@fdncred
Copy link

fdncred commented Sep 28, 2025

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.

@djc
Copy link
Author

djc commented Sep 29, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants