Wednesday, 14 March 2018

DragonFFI Lets You Call C Functions From Any Language

DragonFFI is a foreign function interface (FFI) built using the LLVM and Clang compiler stack to provide a library calling C functions and C data structures that can be used from any other programming language.

At this stage DragonFFI supports Python 2 and Python 3 from Linux/macOS and Python 3 on Windows. The DragonFFI implementation is designed to overcome shortcomings of other FFI implementations like libffi and cffi by its use of LLVM/Clang. This work also includes supporting on-the-fly compilation of C functions.

Moving forward they are looking at adding another foreign language interface with JavaScript and Ruby being two of the mentioned contenders. The lead developer also talks of possibly JIT'ing code from the final language to native function code in the future too.

Those wanting to learn more about DragonFFI can do so via

this LLVM blog post

. The code to DragonFFI is currently hosted on

GitHub

.



Read the full article here by Phoronix
Post a Comment