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

Please make per-dll imports i.e. @import("user32"), @import("kernel32") etc. #21

Open
expikr opened this issue Oct 10, 2023 · 2 comments

Comments

@expikr
Copy link

expikr commented Oct 10, 2023

It would be nice if it's just a one-step look up on MSDN docs to find which DLL something is located in and just include that one, rather than having to additionally deal with zigwin32's arbitrary namespace categories.

@TUSF
Copy link

TUSF commented Nov 2, 2023

How would this work? The metadata these bindings are generated from has DLL names for functions, but not types. Would the bindings generator just include a reference to all types, for every module?

Something like pub usingnamespace @import("alltypes.zig");

I thought maybe the generator could try including only types accessible from the included function signatures, but that doesn't work for COM stuff, because they end up using IUnknown and not its inheriting types.

@ethindp
Copy link

ethindp commented Jan 1, 2024

I'm pretty sure the categorization is not in fact arbitrary. Instead, this is how the Windows namespace in .NET is organized, as well as the windows rust crate, both of which are similarly generated from the same metadata file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants