[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] luaclang - a Lua binding to the Clang API to parse C/C++ files
- From: Graham Wakefield <wakefield@...>
- Date: Sat, 14 Jul 2012 19:02:50 -0700
Great stuff.
I'd definitely like to see a full binding to Clang/LLVM C-APIs in Lua; I think pooling what we have goes a long way already. I'd also like there to be both pure Lua and LuaJIT FFI binding alternatives, hopefully this can be done with near-identical syntax. It's also quite feasible that the Clang parser can generate the bindings to Clang, in a kind of bootstrapping way... did you try running luaclang-parser over the LLVM/Clang headers themselves?
Unfortunately I'm going to be a bit busy over the next few weeks (PhD coming to a close...) but lets keep in touch.
Graham
On Jul 13, 2012, at 9:35 AM, Max de Bayser wrote:
> Michael,
>
> I've been using clang's parser libraries to generate meta-data for a
> C++ reflection API but I would much prefer to use a stable lua wrapper
> for the parser.
>
> I tried to use clang's C API as well but at the time (3 months ago?)
> there was no way to find out several little details about C++ classes.
> I don't remember exactly what was missing, but it was things like
> finding out if a method is pure virtual or not. And I think several of
> the new C++11 features have not made it to the C wrapper yet.. I'll
> try to find it out again and contribute some unit tests for your code
> :). The C++ API, on the other hand is complete but way more complex,
> so a stable Lua wrapper is a great idea.
>
> I'm _very_ interested in C++ JIT compilation as well as it would allow
> me to save a huge amount of space for the method call code. It this
> point I pre-compile everything and the executable gets huge.
>
> You can find my reflection API at
> https://github.com/maxdebayser/reflection . In a way, its a C++ to C++
> binding. It has a Lua binding as well and some unit tests show how to
> use C++ classes from Lua.
>
> I'll give a closer look later but like Graham I'm interested in
> joining efforts (with both projects)
>
> regards,
>
> Max de Bayser
>