Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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