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

Custom bindings to libclang #20

Closed
edsko opened this issue Aug 1, 2024 · 0 comments
Closed

Custom bindings to libclang #20

edsko opened this issue Aug 1, 2024 · 0 comments
Assignees

Comments

@edsko
Copy link
Collaborator

edsko commented Aug 1, 2024

There are two existing bindings on hackage:

Neither of which seems particularly good. The former is last updated in 2017; the latter is only 1500 lines of Haskell, but all undocumented, it implements some crazy reference counting, for reasons unclear, and doesn't have many of the features we need.

The goal here is not to we write our own general purpose bindings, but instead implement some sane bindings for our own use. Unlike what clang-pure does, I think we should not provide any kind of cursors, or try to share memory with libclang, but instead traverse the AST using the libclang interface, construct a pure Haskell value it, managed on the Haskell heap, and then be done with libclang from that point on.

@edsko edsko added this to the 1: `Storable` instances milestone Aug 1, 2024
@edsko edsko self-assigned this Aug 9, 2024
@edsko edsko closed this as completed Dec 20, 2024
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