Module design

Module design 

Source
Expand description

§Design Decisions

  1. These don’t allow for stub/noop fallbacks if the XInput DLLs are missing.
  2. 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 winit from "0.26""0.27", which in turn updated windows-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.