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

windows-bindgen needs no-deps option where bindings don't depend on other crates #3319

Closed
youyuanwu opened this issue Oct 9, 2024 · 1 comment · Fixed by #3359
Closed
Labels
enhancement New feature or request

Comments

@youyuanwu
Copy link

Suggestion

windows-bindgen should generate string types using windows-strings crate types, and windows-strings should work on linux.

After version 0.58, generated code has "windows_core::PCWSTR" but it is not defined on linux "
cannot find type PCWSTR in crate windows_core".
This is due to change: #3143

Previously I was able to use the generated code with PCWSTR on linux by implementing HeapAlloc etc as work around. And such workaround has been implemented in windows-rs directly: #3004

Please support PCWSTR for windows-bindgen (COM) and linux, or expose the previous behavior that we can use work around. For now, we stick with 0.57 version until this ask is completed in future versions.

@youyuanwu youyuanwu added the enhancement New feature or request label Oct 9, 2024
@kennykerr kennykerr added question Further information is requested and removed enhancement New feature or request labels Oct 10, 2024
@kennykerr
Copy link
Collaborator

The windows-strings crate won't support non-Windows but I'm working on a rewrite of windows-bindgen that should make this a lot easier to deal with. Stay tuned.

@kennykerr kennykerr changed the title windows-bindgen code with PCWSTR should compile on linux windows-bindgen needs actual "standalone" mode where it does not depend on other crates Oct 14, 2024
@kennykerr kennykerr added enhancement New feature or request and removed question Further information is requested labels Oct 14, 2024
@kennykerr kennykerr changed the title windows-bindgen needs actual "standalone" mode where it does not depend on other crates windows-bindgen needs no-deps option where it does not depend on other crates Oct 14, 2024
@kennykerr kennykerr changed the title windows-bindgen needs no-deps option where it does not depend on other crates windows-bindgen needs no-deps option where bindings don't depend on other crates Oct 14, 2024
@kennykerr kennykerr linked a pull request Dec 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants