windows-rs icon indicating copy to clipboard operation
windows-rs copied to clipboard

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

Open youyuanwu opened this issue 1 year ago • 1 comments

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: https://github.com/microsoft/windows-rs/pull/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: https://github.com/microsoft/windows-rs/pull/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 avatar Oct 09 '24 22:10 youyuanwu

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 avatar Oct 10 '24 14:10 kennykerr