Subject:
Re: [ruby-ffi] ffi_gen - A generator for Ruby FFI bindings, directly from header files via LLVM's Clang compiler
From:
Jason Lewis
Date:
3/4/12 2:01 PM
To:
ruby-ffi@googlegroups.com

This looks... fantastic. I'll play with it this week!

On Mar 4, 2012 12:01 AM, "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