-
Notifications
You must be signed in to change notification settings - Fork 68
Home
Bittu edited this page Dec 31, 2022
·
2 revisions
This package aims to provide a Boost.Python-like wrapping for C++ functions and types to Julia.
The idea behind this package is that functions and types are registered in C++ code that is then compiled into a dynamic library. This dynamic library is then loaded into Julia by using the @wrapmodule
macro, where the Julia part of this package uses the data provided through a C interface to generate functions and wraps all this into Julia methods automatically.
The functions are passed to Julia either as raw function pointers (for regular C++ functions that don't need argument or return type conversion) or std::functions (for lambda expressions and automatic conversion of arguments and return types).
- Support for C++ functions, member functions and lambdas
- Classes with single inheritance, using abstract base classes on the Julia side
- Trivial C++ classes can be converted to a Julia isbits immutable
- Template classes map to parametric types, for the instantiations listed in the wrapper
- Automatic wrapping of default and copy constructor (mapped to copy) if defined on the wrapped C++ class
- Facilitate calling Julia functions from C++