Replace windows-sys dependency with windows-bindgen#161
Replace windows-sys dependency with windows-bindgen#161Jake-Shadle wants to merge 4 commits intoconsole-rs:masterfrom
windows-sys dependency with windows-bindgen#161Conversation
|
There is nothing wrong of having a crate installed multiple times. But there is a problem of having to write the bindings by yourself.
I strongly advise against pulling the bindings in the project code and taking the burden of maintaining the bindings by the project contributors. |
windows-sys dependency with manual bindingswindows-sys dependency with windows-bindgen
| @@ -0,0 +1,44 @@ | |||
| // Uncomment this to regenerate bindings | |||
There was a problem hiding this comment.
I'd recommend running this test unconditionally. Then you can ensure that the bindings are always up to date and regressions haven't snuck in. You can use a diff check via CI to ensure the generated bindings haven't diverged from what's committed to your repo.
There was a problem hiding this comment.
I guess that's up to the maintainers, personally speaking I think compiling all of that code and writing files to disk every test run for something thst will not meaningfully ever change is wasteful.
There was a problem hiding this comment.
It's definitely a lot more work to maintain this kind of dependency than simply using a Cargo dependency on the windows-sys crate. 😊
|
Sorry I did not see this. I'm not sure if I like the idea of maintaining those bindings. |
|
No worries. |
|
@mitsuhiko is this something you might want to reconsider now that all the tooling is officially published by Microsoft? There are no bindings to "maintain", they only need to be regenerated with the official tooling which is nowadays just a simple EDIT: Such a thing looks like this Traverse-Research/amd-ext-d3d-rs@fa55fdb, and given the scope of this project it can either use sys bindings or the |
This PR replaces the
windows-syscrate with only the minimal binding needed by this crate, removing a source of frustration microsoft/windows-rs#1720The currently published version uses the outdated 0.42 version, but as we can see in #157, which bumps from 0.42 -> 0.45, the minor version churn of windows-sys is irrelevant for this crate since the bindings are never going to meaningfully change.