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

Generate bindings for macros #43

Open
2 tasks
edsko opened this issue Aug 2, 2024 · 1 comment
Open
2 tasks

Generate bindings for macros #43

edsko opened this issue Aug 2, 2024 · 1 comment
Assignees
Labels

Comments

@edsko
Copy link
Collaborator

edsko commented Aug 2, 2024

This is a catch-all ticket currently for generating bindings for "all" macros, though we will almost certainly have to do this on an ad-hoc basis, supporting macros of a certain shape only:

@edsko edsko added this to the 4: Macros milestone Aug 2, 2024
@edsko edsko assigned edsko and unassigned sheaf Sep 18, 2024
@edsko
Copy link
Collaborator Author

edsko commented Sep 18, 2024

I'm going to do some work on this as part of parsing the standard library header files.

edsko added a commit that referenced this issue Sep 20, 2024
The idea is to have some bootstrapping code as part of `hs-bindgen` that trawls
the C standard headers looking for type definitions (such as `uint64_t`); these
types should become part of a prelude, which we can recognize out of the box
(so that instead of generating a new typedef for `uint64_t` every time we
generate bindings, we use the one and only from the prelude).

Since the standard headers also contain a whole bunch of macros, and we anyway
want to support generating bindings for specific forms of macros (#43), this
also has the beginnings of a parser for C macros.
edsko added a commit that referenced this issue Sep 20, 2024
The idea is to have some bootstrapping code as part of `hs-bindgen` that trawls
the C standard headers looking for type definitions (such as `uint64_t`); these
types should become part of a prelude, which we can recognize out of the box
(so that instead of generating a new typedef for `uint64_t` every time we
generate bindings, we use the one and only from the prelude).

Since the standard headers also contain a whole bunch of macros, and we anyway
want to support generating bindings for specific forms of macros (#43), this
also has the beginnings of a parser for C macros.
@edsko edsko added the macros label Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants