A simple python + libclang script to simplify wrapping c++ code with sol2
This is a PoC tribute to a great library https://github.com/ThePhD/sol2 which helps to connect lua and c++. Yet most of the time you don't want to wrap all the classes/methods/functions - you might like the idea of automatic boilerplate code generation.
Python 3.6 libclang sol3
usage: main.py [-h] file folder includes library_name
positional arguments: file Filename of meta header file of the library folder A folder where you want your binding to be created in includes Path to the includes folder of the targeted library library_name Name of the targeted library, will be used to prefix filenames and usertype names
optional arguments: -h, --help show this help message and exi
simply run :
python3 main.py /tmp/Box2D/includes/Box2d.h /tmp/output/ /tmp/Box2D/includes/ Box2D
Can be found at example folder :-)
As stated before - this is yet - a PoC - so right now it does: