Expand description
§Design Decisions
§Why don’t you link xinput.lib? Or kind = "raw-dylib" equivalent?
- These don’t allow for stub/noop fallbacks if the XInput DLLs are missing.
- These don’t allow good control over which XInput DLLs are used.
You might ask: why would DLL version control matter? This is best explained by example. For one bug I encountered:
- I upgraded
winitfrom"0.26"→"0.27", which in turn updatedwindows-sys. - This provided it’s own import lib, linking XInput symbols against
XInputUap.dll, introducing a crash bug on exit. - This happened despite not using
features = ["Win32_UI_Input_XboxController"]. - Said linkage “won” the “race” to resolve XInput symbols in code entirely unrelated to
windows-sys. kind = "raw-dylib"does not avoid the static linkage race. I’ve tried it. Conflicting definitions will be merged.