From: Charles Oliver Nutter Date: 2008-11-04T04:08:28+09:00 Subject: Re: [ANN] FFI 0.1.1 (Foreign Function Interface) for Ruby 1.8.6/7 and 1.9 We (JRuby and Rubinius contributors) designed in the ability to specify calling convention for a given library bound through FFI. Largely this was needed to support Win32's stdcall, but if Linux/PPC has a different convention and libffi supports it, then FFi will too (though we may have to add it to the list of accepted conventions). I'll check on the syntax we're supporting and get back to ya. - Charlie (mobile) On Nov 3, 2008, at 12:56, Sylvain Joyeux wrote: >>> 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 did not know about libffi ... I'll have to look if I should not > replace > dyncall by libffi then. Thanks for the info. > >> 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. > I guess it is a bit of both. Given that libffi is supported on Linux/ > PPC64, I > guess having it on Linux/PPC should not be that much of a problem -- > but still, > I think the calling convention can be slightly different between the > two > architectures. > > Sylvain > >