C++ Bindings
ruby-bindgen creates Ruby bindings for C++ libraries using Rice. Creating C++ bindings takes more work than creating C bindings, so if a library provides both a C and C++ API you should use the C API.
ruby-bindgen does its best to generate compilable Rice code. It has been battle tested against OpenCV, which is a large, complex C++ API with over a thousand classes and ten thousand methods.
For many libraries, the generated bindings will compile and work with no additional changes. For example, Rice includes a fully automated example binding for the BitmapPlusPlus library.
For more complex libraries, like OpenCV, some customization will likely be required.
Getting Started
See Getting Started for a step-by-step guide to creating your first Rice bindings.
Output
See Rice Output for details on the generated files, including header files, project files, the include header, and the init function call graph.
Build System
After generating Rice bindings, you will need to setup a build system for your extension. ruby-bindgen can generate CMake build files to compile and link the generated bindings.
Packaging
For packaging your extension as a gem, see the Rice Packaging documentation.
Example
For a complete, fully automated example see BitmapPlusPlus-ruby.