From: Charles Oliver Nutter Date: 2008-11-03T19:01:11+09:00 Subject: Re: [ANN] FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9 Sylvain Joyeux wrote: > On Sat, Nov 01, 2008 at 08:16:39AM +0900, Charles Oliver Nutter wrote: >> The JRuby team is proud to announce the release of FFI for Ruby 1.8.6/7 >> and 1.9! >> >> FFI (gem install ffi) is a library for programmatically loading dynamic >> libraries, binding functions within them, and calling those functions >> from Ruby code. Here's a quick sample of binding and calling the getpid >> C library function: > > Interesting. On what kind of architectures is the binding part working ? I'm > using dyncall to do the actual interfacing work (http://www.dyncall.org/) in a > DL-replacement library, but my problem is that dyncall does not like Linux-PPC. > What are you using on your side ? Ruby FFI uses libffi, as does JNA which ships with JRuby. I'm not certain about libffi specifically. but JNA claims to support OSX (ppc, x86, x86_64), linux (x86, amd64), FreeBSD/OpenBSD (x86, amd64), Solaris (x86, amd64, sparc, sparcv9) and Windows (x86, amd64). I'm not sure if linux-ppc support is not provided because it's not supported or because nobody has a linux-ppc machine to build on. The latter has been the case for several entries on the list; I myself was the build monkey for Solaris/AMD64 and Linux/AMD64 for a short time, before which there was no shipped support. There's certainly one way to find out...gem install ffi. Report back here or on ruby-ffi mailing lists what you learn :) http://kenai.com/projects/ruby-ffi - Charlie