Commit ab020f0
committed
Windows: Rework kernel32 apis
To facilitate #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 #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.1 parent 9d7b040 commit ab020f0
3 files changed
+505
-323
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1906 | 1906 | | |
1907 | 1907 | | |
1908 | 1908 | | |
1909 | | - | |
| 1909 | + | |
1910 | 1910 | | |
1911 | 1911 | | |
1912 | 1912 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| |||
2683 | 2683 | | |
2684 | 2684 | | |
2685 | 2685 | | |
2686 | | - | |
| 2686 | + | |
2687 | 2687 | | |
2688 | 2688 | | |
2689 | 2689 | | |
| |||
0 commit comments