Use rbgccxml and rice to automatically generate C++ Ruby extensions.