-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Open
The-King-of-Toasters
wants to merge
2
commits into
ziglang:master
Choose a base branch
from
The-King-of-Toasters:windows-api-refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Windows: Rework kernel32 apis #19641
The-King-of-Toasters
wants to merge
2
commits into
ziglang:master
from
The-King-of-Toasters:windows-api-refactor
+540
−335
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The-King-of-Toasters
changed the title
QueryObjectName: Add error union
Windows: Rework kernel32 apis
Apr 13, 2024
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
from
April 19, 2024 14:50
b987c2e
to
edcbf9d
Compare
I've added fleshed out the comments on the remaining APIs. I've categorised them into three groups:
|
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
2 times, most recently
from
April 20, 2024 03:38
3e99b86
to
ab020f0
Compare
squeek502
reviewed
Apr 22, 2024
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
2 times, most recently
from
April 22, 2024 07:12
60252bb
to
7615944
Compare
squeek502
reviewed
Apr 22, 2024
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
2 times, most recently
from
April 25, 2024 07:15
57f8ff0
to
6fb865e
Compare
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
2 times, most recently
from
May 12, 2024 14:25
3999adb
to
98b3e14
Compare
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
from
May 24, 2024 09:58
98b3e14
to
d33d0f9
Compare
The-King-of-Toasters
force-pushed
the
windows-api-refactor
branch
from
May 29, 2024 03:03
d33d0f9
to
aa26b64
Compare
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
force-pushed
the
windows-api-refactor
branch
from
May 29, 2024 04:07
aa26b64
to
44b364c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 these 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 Prefer depending on NtDll rather than kernel32 or other higher level DLLs #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, where they wrap functions with tracing.
Use
zigwin32
.I've also added
TODO
comments that specify which functions can be reimplemented usingntdll
APIs in the future.Other changes: