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

How does scapix parse C++ headers? #20

Closed
Time0o opened this issue Dec 16, 2020 · 2 comments
Closed

How does scapix parse C++ headers? #20

Time0o opened this issue Dec 16, 2020 · 2 comments

Comments

@Time0o
Copy link

Time0o commented Dec 16, 2020

I accidentally closed an identical issue earlier, here it is again:

I'm not sure if opening an issue for this is appropriate but I have a question regarding scapix's implementation.

I've started to work on a similar project before I came across this and I'm wondering whether scapix can already do what I was trying to achieve. But after skimming through the website and the source code I still don't quite understand how scapix generates bindings. In particular, at some point it must surely parse the C++ headers for which bindings should be generated.

In my project I use Clang for this and then generate Bindings by working with the generated AST via Clang's C++ interface. However, I don't see scapix doing this. The code base seems to consist almost solely of target language specific stuff and is in general much smaller than I would have expected it to be.

So how exactly does scapix process C++ headers?

@Boris-Rasin
Copy link
Member

Yes, Scapix does exactly what you describe - to parse C++ headers it uses Clang's generated AST via Clang's C++ interface. This part of Scapix is released in binary form for various platforms, as compiling Clang takes a lot of time and storage. I also didn't release sources for this part of Scapix yet, but I plan to do so at some point.

If you are missing some features in Scapix or have any other suggestions please let me know.

@Time0o
Copy link
Author

Time0o commented Dec 16, 2020

Thanks for the quick reply. I think that answers my question, I will try and see if I apply Scapix to my use case.

@Time0o Time0o closed this as completed Dec 16, 2020
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

2 participants