Subject:
[ruby-ffi] ffi_gen - A generator for Ruby FFI bindings, directly from header files via LLVM's Clang compiler
From:
Richard Musiol
Date:
3/3/12 9:55 PM
To:
ruby-ffi@googlegroups.com

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.

The project can be found here: https://github.com/neelance/ffi_gen
You are invited to give it a try on your favorite C library. Feedback is always welcome.

Richard