Skip to content

Remove windows-sys#2824

Closed
Jake-Shadle wants to merge 1 commit into
briansmith:mainfrom
Jake-Shadle:main
Closed

Remove windows-sys#2824
Jake-Shadle wants to merge 1 commit into
briansmith:mainfrom
Jake-Shadle:main

Conversation

@Jake-Shadle

Copy link
Copy Markdown

This is an alternative to #2570 that still removes the windows-sys dependency but inlines the bindings (1 function, 1 constant) instead of relying on std.

Comment thread src/cpu/aarch64/windows.rs Outdated
Comment thread src/cpu/aarch64/windows.rs Outdated
@konstin

konstin commented Jun 23, 2026

Copy link
Copy Markdown

This change would be great to have, as we're seeing a lot of duplication with the windows crates.

@briansmith briansmith left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Besides addressing the other two comments, please squash these into one commit.

The commit message should be something like "Vendor windows_sys::IsProcessorFeaturePresent from windows_sys <whatever the version you copied it from>."

Comment thread src/polyfill/mod.rs Outdated
Comment thread src/polyfill/windows_sys.rs Outdated
// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
// OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
// CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The license and copyright should be the license/copyright of whatever you copied/reduced the bindings from.

@Jake-Shadle

Copy link
Copy Markdown
Author

I just manually wrote this binding from the data in the linked API doc, so I'm not sure what license you want me to put in the header, the windows API doesn't really have a license AFAIK, just a terms of use https://learn.microsoft.com/en-us/legal/microsoft-apis/terms-of-use.

@briansmith

Copy link
Copy Markdown
Owner

@Jake-Shadle PTAL at #2865, which uses windows-bindgen to automate the generation. Closing this in favor of that. Thanks for your contribution.

@briansmith briansmith closed this Jun 30, 2026
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.

3 participants