Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Rework kernel32 apis #19641

Merged
merged 2 commits into from
Jul 18, 2024

Commits on Jul 17, 2024

  1. Configuration menu
    Copy the full SHA
    1735455 View commit details
    Browse the repository at this point in the history
  2. Windows: Rework kernel32 apis

    To facilitate ziglang#1840, this commit slims `std.windows.kernel32` to only
    have the functions needed by the standard library. Since this will break
    projects that relied on these, I offer two solutions:
    
    - Make an argument as to why certain functions should be added back in.
      Note that they may just be wrappers around `ntdll` APIs, which would
      go against ziglang#1840.
      If necessary I'll add them back in *and* make wrappers in
      `std.windows` for it.
    - Maintain your own list of APIs. This is the option taken by bun[1],
      where they wrap functions with tracing.
    - Use `zigwin32`.
    
    I've also added TODO comments that specify which functions can be
    reimplemented using `ntdll` APIs in the future.
    
    Other changes:
    - Group functions into groups (I/O, process management etc.).
    - Synchronize definitions against Microsoft documentation to use the
      proper parameter types/names.
    - Break all functions with parameters over multiple lines.
    The-King-of-Toasters committed Jul 17, 2024
    Configuration menu
    Copy the full SHA
    3095e83 View commit details
    Browse the repository at this point in the history