You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new windows_bindgen::standalone function added in #2396 requires one to list the full namespaced name of the item one wants to generate bindings for, which is fine. However, I was surprised to find that items are not emitted recursively, but rather that every item needs to be listed individually to be bound.
For example, the user wants to emit bindings for SetConsoleTextAttribute
But now they also need to add HANDLE, CONSOLE_CHARACTER_ATTRIBUTES, and BOOL to emit all the items necessary for the binding to typecheck, which gets incredibly tedious
[package]
name = "console"
[dev-dependencies]
windows-bindgen = "0.47"
Expected behavior
I expected the SetConsoleTextAttribute function to be emitted, as well as the type for HANDLE, CONSOLE_CHARACTER_ATTRIBUTES, and BOOL.
Actual behavior
Only the binding for the function was emitted, meaning the user must additionally specify each of the individual items used by (in this case) the function, but I assume it applies to other things like structs/unions etc.
Additional comments
No response
The text was updated successfully, but these errors were encountered:
Which crate is this about?
other (please share in the comments)
Crate version
0.47.0
Summary
The new
windows_bindgen::standalone
function added in #2396 requires one to list the full namespaced name of the item one wants to generate bindings for, which is fine. However, I was surprised to find that items are not emitted recursively, but rather that every item needs to be listed individually to be bound.For example, the user wants to emit bindings for
SetConsoleTextAttribute
But now they also need to add
HANDLE
,CONSOLE_CHARACTER_ATTRIBUTES
, andBOOL
to emit all the items necessary for the binding to typecheck, which gets incredibly tediousToolchain version/configuration
Reproducible example
Crate manifest
Expected behavior
I expected the
SetConsoleTextAttribute
function to be emitted, as well as the type forHANDLE
,CONSOLE_CHARACTER_ATTRIBUTES
, andBOOL
.Actual behavior
Only the binding for the function was emitted, meaning the user must additionally specify each of the individual items used by (in this case) the function, but I assume it applies to other things like structs/unions etc.
Additional comments
No response
The text was updated successfully, but these errors were encountered: