Thomas Hurst wrote: > * Charles Oliver Nutter (charles.nutter / sun.com) wrote: > >> The JRuby team is proud to announce the release of FFI for Ruby >> 1.8.6/7 and 1.9! > >> Finally, there's no need to write a C extension to call C libraries, >> and the same FFI code will work in Ruby 1.8.6/7, Ruby 1.9, JRuby >> 1.1.4+, and Rubinius (though Rubinius has no callback support yet). > > Awesome. I've used DL to link up some custom libs to a Ruby service, > will give FFI a go and see how it compares :) > > Are things like structs likely to be supported in future, ala Python > ctypes? Actually structs are already supported! See the blog post, and I believe there's some examples shipped with the gem. There needs to be more docs, certainly, and hopefully they'll get some TLC soon. Also, I forgot to call out Evan Phoenix for coming up with the API and initial design, and he or someone else on Rubinus wrote up the templating/header-file-processing stuff as well. And of course a huge thanks to Wayne Meissner for implementing FFI not just once (for JRuby) but twice (for C Ruby). His work will mean a huge leap forward in cross-impl portability. - Charlie