Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Lua bindings generator that uses Doxygen to parse C/C++ headers.
Lua C++ C CMake

dub Build Status

Doxygen based Lua binding generator.



luarocks install dub


Currently, the parser supports:

  • public methods
  • public attributes read/write
  • pseudo-attributes read/write by calling getter/setter methods.
  • custom bindings (for methods and global functions).
  • custom read/write attributes (with void *userdata helper, union handling)
  • public class methods
  • public static attributes read/write
  • pointer to member (gc protected)
  • cast(default)/copy/disable const attribute
  • member pointer assignment (gc protected)
  • natural casting from std::string to string type (can include '\0')
  • class instantiation from templates through typedefs
  • class alias through typedefs
  • bindings for superclass
  • automatic casting to base class
  • default argument values
  • overloaded functions with optimized method selection from arguments
  • operator overloading (even operator[], operator() and operator+= and such)
  • return value optimization (no copy)
  • simple type garbage collection optimization (no __gc method)
  • namespace
  • nested classes
  • class enums
  • global enums
  • build system
  • group multiple bindings in a single library
  • rewrite class or library names
  • native Lua table wrapping setmetatable({super = obj}, Vect)
  • callback from C++ with error handling in Lua (with self.error).
  • error function captures current 'print' function and can be used with self._errfunc.
  • fully tested
  • custom method binding name
Something went wrong with that request. Please try again.