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

Upgrade windows-rs to version 0.57 #43

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

youyuanwu
Copy link
Collaborator

@youyuanwu youyuanwu commented Jun 28, 2024

windows-rs version 0.57 has various improvements for generated com bindings and the code size reduces.

We have been using win-bindgen with config=package, which is not publicly supported, and we are advised to switch to config=implement that is supported external to windows-rs. See microsoft/windows-rs#3100 for details.

The generated code are reorganized due to the generation config mode, and the mod structures are remapped so that there is no unwanted nesting of mods, for example, FabricRuntime is no longer inside FabricCommon but they are siblings now. The generation of the code and remapping of the mods are still hacky, and we still need Azure/service-fabric-metadata#1 to improve this.

Previously all mods are generated once, but now, each mod like FabricCommon and FabricRuntime is generated separately from the winmd file per pass. The generation speed maybe slowed but in practice it is not observable.

This upgrade will cause break in down stream because of the mod layout change. But it is easy to fix: just change the imports(use) with different path.

@youyuanwu youyuanwu force-pushed the windows-rs-0.57-upgrade branch from 1c2d757 to c6fe207 Compare June 28, 2024 05:24
@youyuanwu youyuanwu marked this pull request as ready for review June 28, 2024 16:50
Copy link
Contributor

@jrahman jrahman left a comment

Choose a reason for hiding this comment

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

Didn't have a chance to review each file in detail, but overall seems fine

crates/tools/fabric-gen/src/gen.rs Outdated Show resolved Hide resolved
crates/libs/core/src/client/mod.rs Outdated Show resolved Hide resolved
@youyuanwu youyuanwu force-pushed the windows-rs-0.57-upgrade branch from c6fe207 to c5ad9d0 Compare June 28, 2024 21:48
@youyuanwu youyuanwu merged commit cce27f7 into Azure:main Jun 28, 2024
3 checks passed
@youyuanwu youyuanwu deleted the windows-rs-0.57-upgrade branch June 28, 2024 21:57
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