Wrapper generator from C to scripting languages, currently supporting LuaJIT FFI only. It uses clang via c_api_extract for parsing and understanding C header files.
By deafult generates metatypes for struct and union definitions and deduces __gc
and other methods from C functions names and parameters, included in the __index
table.
inclua also supports adding native Lua definitions for any metamethods and other definitions
for metatypes, reading them verbatim from a YAML or JSON file.
inclua is available on PyPI and may be installed using pip
:
$ pip install inclua
On your shell:
$ inclua <input> [-i <pattern>...] [-n <namespace>...] [options] [-- <clang_args>...]
Check out the help for more information on arguments:
$ inclua -h
Check out the examples
folder and csfml-luajit for examples of usage.
- Try matching both typedef and struct|union name when searching for methods
- Add support for generating Lua C bindings
- Add more examples and document additional definitions input format
- Test on Windows