registry-rs
registry-rs copied to clipboard
Adopt official windows-rs API
I do not know if this works. I am fairly new to Rust, but I did my best. I did this because I do not want both winapi and windows-rs as dependencies in my future project. Please see https://github.com/rust-windowing/winit/pull/2057, as my contribution is based off of this.
Please leave comments on any problems with the changes, and I will be sure to fix them. I do not know how you are testing this, I may wish to implement tests for you. 😄
Very interesting. I was thinking about investigating this recently, so I'm very happy that you've done that for me haha.
How does this impact build times?
4.38s --> 7.66s Edit: May not be an accurate measurement. Best try it yourself.
There's discussion about the speed (or lack thereof) compiling windows-rs in the PR I linked above.
Yeah it's not a strict science, but ballparks are relevant. Will have a think on this for a bit and get back to you. 😄
@bbqsrc any update on this ? Would love to have this merged....
Since, The PR repo is deleted, Is there anyway I could least use this PR as a dependency ??
registry = { git = "https://github.com/bbqsrc/registry-rs", tag = "d912b165e826add5d484ff21683a044585cb591f" }
is not working well
EDIT:
registry = { git = "https://github.com/bbqsrc/registry-rs", rev = "refs/pull/5/head" }
is working good. Thanks to this.
I just ran across this again, and wanted to close it because it seems stale. Just checking before I do, to make sure this change isn't wanted.
@spikespaz it looks like everyone is slowly moving away from winapi towards the official and maintained windows bindings, in various forms. Though this PR needs a rather large overhaul as the bindings are now much further ahead and in a much better place than when these changes were made.
If the build times are still an issue on the latest version, and if these types aren't leaking into the public API, you may look into the recently released windows-core crate together with windows-bindgen which generates a more modest private set of bindings limited to "just the ones you need" (unfortunately currently with all the types (in)directly referenced by functions in a module/type).
An up-to-date example is available at https://github.com/strawlab/iana-time-zone/pull/117; let me know if you need assistance integrating/testing this for registry-rs!
And landing this will be a "Fixes #9" :grimacing:
It looks like the Cargo.lock is in the .gitignore. It shouldn't be, the lock files (for almost any build system) are intended to be included in VCS for reproducibility.
Can I fix that?
It looks like the
Cargo.lockis in the.gitignore. It shouldn't be, the lock files (for almost any build system) are intended to be included in VCS for reproducibility.Can I fix that?
I am wrong, that is not the case for libraries.
@spikespaz I'm sure you've already heard this, but the official Rust guidance these days is: It depends on the project's needs, with the default being that the Cargo.lock is included.