I wrote a very basic tool to generate OCaml bindings for the WxWidgets C++ library (
https://github.com/OCamlPro/ocplib-wxOCaml), and then a very different one for LLDB (
https://github.com/OCamlPro/typerex-lldb). In both cases, methods of C++ class A are mapped to functions of OCaml module A. The main difference is that WxWidgets makes heavy use of inheritance, while LLDB does not use it at all. Consequently, there are many "cast" functions in WxOCaml, while there are none for LLDB. Also, LLDB is very strict on the syntax of its include files, which makes it very easy to parse them directly from OCaml (there is no need for a DSL), whereas for WxWidgets, I had to copy and slightly modify the C++ method definitions into a subset (the DSL) that could be used from OCaml.
So, in your bindings, which OCaml type do you target for a C++ class ? Also, is there some support for garbage collection ? How do you detect that a C++ object is removed, so that the corresponding OCaml object can be removed ? Is it generalizable to any C++ framework ?