Hi,
I would like to introduce ffi_gen. It is a generator for FFI bindings that uses C header files as input. It is similar to SWIG, but hopefully a lot better, since it is based on Clang. Clang is the LLVM project's C(++) compiler that is designed to be GCC compatible. I am using its backend to analyse the headers and let it resolve all macros and stuff. Then I take its completely wired structures and turn them into beautiful Ruby FFI code. Even the documentation comments are parsed and integrated as YARD comments.
You are invited to give it a try on your favorite C library. Feedback is always welcome.
Richard