Currently, we parse some of the xnd/ndtypes/gumath c files to generate compatible LLVM functions that can call their exposed functions. We do this by parsing the C files in Python.
Instead, we could use clang itself to generate these bindings. That way we don't have to reimplement a C parser and define the mappings between C and LLVM ABIs ourselves.
Currently, we parse some of the xnd/ndtypes/gumath c files to generate compatible LLVM functions that can call their exposed functions. We do this by parsing the C files in Python.
Instead, we could use clang itself to generate these bindings. That way we don't have to reimplement a C parser and define the mappings between C and LLVM ABIs ourselves.
See https://github.com/aguinet/dragonffi/issues/13 for some discussion using dragonffi to do this (it has a Python API)