This document borrows heavily from the luabind documentation. http://luabind.sourceforge.net/docs.html#intro
Clbind is a C++ template library that helps you create bindings between C++ and Clasp Common Lisp. It is very different from a typical FFI (foreign function interfaces) libraries. It allows you to expose functions, classes, methods, enums and other C++ features to Clasp. Clbind also provides the functionality to create classes in Common Lisp that subclass C++ classes and add CLOS slots to those derived classes. Common Lisp functions can override C++ methods.
Clbind is implemented using C++ template meta programming. It is heavily inspired by boost::python and luabind, two other C++ template libraries that provide interoperation between C++ and Python and Lua respectively. Clbind doesn’t require you to run extra preprocessing passes to compile your project (all of the work is done by the C++ compiler). Clbind doesn’t require you to know the exact signature of each function that you register because the C++ template library will determine this information at compile time.
Clbind closely follows the API used by luabind. I will more fully describe the Clbind API in the coming weeks.
For examples of how Clbind is used see: clasp/src/asttooling/astExpose.cc::initialize_astExpose() or clasp/src/asttooling/clangTooling.cc::initialize_clangTooling()
in the Clasp source code.