Subject:
Re: [ruby-ffi] [ANN] c2ffi-ruby
From:
Jeremy Voorhis
Date:
2/25/13 11:26 AM
To:
ruby-ffi@googlegroups.com

It looks like I forgot to include the link. Here's the ffi-gen Github page:

https://github.com/neelance/ffi-gen

For the curious, here is an example of ffi-gen being used to generate LLVM bindings:

https://github.com/ruby-llvm/ruby-llvm/blob/master/Rakefile#L22-L56.


On Mon, Feb 25, 2013 at 9:24 AM, Jeremy Voorhis <jvoorhis@gmail.com> wrote:
Hi Ryan,

This looks great. I'd like to use the opportunity to point out ffi-gen, a similar project which grew out of the ruby-llvm project, and is used to generate the LLVM ffi for ruby-llvm. Its test cases include Cairo, Clang itself, OpenGL, Sqlite3 and others.

These projects seem subtly different in scope–ffi-gen implements Clang bindings itself and only has a Ruby backend, but there may be some opportunity to share code or techniques.

Cheers,


On Mon, Feb 25, 2013 at 8:41 AM, Ryan Pavlik <rpavlik@gmail.com> wrote:
For anyone interested, I've recently been working on c2ffi (https://github.com/rpav/c2ffi), which uses Clang to parse C into JSON, and I have just posted c2ffi-ruby, which transforms the JSON into a file for ruby-ffi:

    https://github.com/rpav/c2ffi-ruby

This should produce more accurate input than SWIG.

Apologies for ugly code; this was done as a bit of a test for c2ffi, and I haven't written much ruby in awhile.  Nor has it been extensively tested, but it does parse the included Cairo bindings.

--
 
---
You received this message because you are subscribed to the Google Groups "ruby-ffi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-ffi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy Voorhis


--
Jeremy Voorhis

--
 
---
You received this message because you are subscribed to the Google Groups "ruby-ffi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-ffi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.