Subject:
Re: [ruby-ffi] ffi_gen - A generator for Ruby FFI bindings, directly from header files via LLVM's Clang compiler
From:
Charles Strahan
Date:
3/4/12 11:34 AM
To:
ruby-ffi@googlegroups.com

Wow, that's pretty cool looking!

-Charles

On Sat, Mar 3, 2012 at 10:55 PM, Richard Musiol <mail@richard-musiol.de> wrote:
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