(wip) emit a C++ wrapper