Skip to content

Instantly share code, notes, and snippets.

@retep998
Created October 18, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retep998/f1c4d100bfd38c3d01b4dadcfa6d7395 to your computer and use it in GitHub Desktop.
Save retep998/f1c4d100bfd38c3d01b4dadcfa6d7395 to your computer and use it in GitHub Desktop.
What winapi needs to have better version/feature selection

There are 5 winapi families:

  1. WINAPI_FAMILY_PC_APP
  2. WINAPI_FAMILY_PHONE_APP
  3. WINAPI_FAMILY_SYSTEM
  4. WINAPI_FAMILY_SERVER
  5. WINAPI_FAMILY_DESKTOP_APP
  • A crate that depends on winapi should specify the set of winapi families that it supports.
  • A single winapi family is chosen for an entire project, and the user has control over which family this is.
  • winapi is compiled for this family and informs all downstream crates which family it was compiled for so they can configure their code correctly.
  • If a crate doesn't specify that it supports the current winapi family, compilation should fail early with a nice error message indicating that the crate doesn't support the current winapi family. Otherwise the user would be confronted with confusing error messages about unresolved symbols.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment