-
Notifications
You must be signed in to change notification settings - Fork 476
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
Generate Link dll name with case matching winmd definition #2932
Comments
I'd prefer we leave this as-is. This will continue to be a problem regardless of what we do here, due to the case-sensitive filesystem in use on a target we don't support. Related: microsoft/win32metadata#648, #638 |
Perhaps a middle ground option here would be to add a bindgen configuration flag. Although it's not clear how useful that would be for service-fabric as it appears they do their own gen. |
The custom code gen is irrelevant for this issue. It is auto generating some experimental bindings on top of the windows-bindgen produced code. |
Feel free to take it for a spin by pointing your Cargo dependency to the git repo. |
Updated all windows versions in Cargo toml files to 0.56. Regenerated com crate by running the generate_rust cmake target. The generated code size reduced significantly. Dll link name fix from windows-rs is included: microsoft/windows-rs#2932
Suggestion
Given the function in winmd definition:
windows-bindgen generates the following code for linking:
The link name has lower case "fabriccommon" not matching the case "FabricCommon". This request is to ask to make the name the same by default without changing the casing or add an option to configure this.
The desired code should look like this:
On windows there is this does not affect dll look up, but we (sf rust) use the same binding on linux, and the linker is case sensitive and cannot locate the lib. The current work around is to do a string replacement after code generation like this:
https://github.com/Azure/service-fabric-rs/blob/2fef8f1fe56135ddd3e6eea027ba59e34b0d7ad2/CMakeLists.txt#L43
The text was updated successfully, but these errors were encountered: