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

Filtering Mechanism #37

Open
marler8997 opened this issue Jul 13, 2024 · 0 comments
Open

Filtering Mechanism #37

marler8997 opened this issue Jul 13, 2024 · 0 comments

Comments

@marler8997
Copy link
Collaborator

marler8997 commented Jul 13, 2024

For use cases like Mach (and maybe std, maybe Bun) it may make sense to add a filtering mechanism to generate subsets of the very substantial API. The bindings are around 72 MB of zig code (more than the zig compiler itself) but many projects only need a very small slice of this (Mach only uses about 172K of Zig bindings). It should be pretty easy to add a filtering mechansim, maybe give a list of DLLS or functions (or both) and only generate those functions, the types for the parameters they use, and the constants whose types are included in those parameter types. This may not cover all constant/types, so maybe allow specifying those.

So the filter is, DLLS, Functions, Types, Constants (where each level will automatically pull in what it needs from the additional level).

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

1 participant