Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce windows-core crate #2475

Merged
merged 19 commits into from
Apr 25, 2023
Merged

Introduce windows-core crate #2475

merged 19 commits into from
Apr 25, 2023

Conversation

kennykerr
Copy link
Collaborator

@kennykerr kennykerr commented Apr 25, 2023

This update adds the windows-core crate that takes the foundational support in the windows crate's core module and splits it out into a dedicated crate so that it may be used without the hefty windows crate, if needed.

The windows-core crate also ditches the hand-rolled internal bindings and instead depends on standalone bindings generated by the windows-bindgen crate.

The windows-bindgen crate’s standalone code generation has been upgraded to support generating bindings for COM and WinRT APIs as well. The standalone_sys function will generate windows-sys style bindings while the standalone_win function will generate windows style bindings. The latter fully supports COM and WinRT types.

Developers using the windows-sys crate are unaffected by this update as it does not depend on the windows-core crate and continues to be the recommended approach for raw bindings to the C-style Windows APIs.

Developers using the windows crate are mostly unaffected by this update as a dependency on the windows-core crate is automatically added. However, if you depend on the component authoring support, you will need to add a dependency to the windows-core crate yourself since the windows-bindgen crate generates code that only depends on the windows-core crate to avoid a circular dependency.

This update further addresses feedback from #1720.

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.

1 participant