Published in

PeerJ, PeerJ Computer Science, (4), p. e149

DOI: 10.7717/peerj-cs.149

Links

Tools

Export citation

Search in Google Scholar

AutoWIG: Automatic generation of python bindings for C++ libraries

Journal article published in 2018 by Pierre Fernique, Christophe Pradal ORCID
This paper is made freely available by the publisher.
This paper is made freely available by the publisher.

Full text: Download

Red circle
Preprint: archiving forbidden
Red circle
Postprint: archiving forbidden
Green circle
Published version: archiving allowed
Data provided by SHERPA/RoMEO

Abstract

The Python programming language is one of the most popular language in scientific computing. However, most scientific Python packages incorporates C and C++ libraries. While several semi-automatic solutions and tools exist to wrap C++ libraries (Cython, Boost.Python and SWIG), the process of wrapping a large C++ library is cumbersome and time consuming. Some solutions have been developed in the past (e.g. Py++) but require to write complex code to automate the process, and rely on technologies that are not maintained. AutoWIG relies on the LLVM/Clang technology for parsing C/C++ code and the Mako templating engine for generating Boost.Python wrappers. Rather than having to write parsers in Python such as in Py++, the approach is similar to XDress, but for Boost.Python wrappers instead of Cython wrappers. We illustrate the usage of AutoWIG on a complex collection of C++ libraries for statistical analysis.