DragonFFI Lets You Call C Functions From Any Language
Written by Michael Larabel in LLVM on 13 March 2018 at 04:39 PM EDT. Add A Comment
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.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week