Subject:
Re: [ruby-ffi] Re: Towards a 1.0 API for Ruby FFI
From:
Ernest Prabhakar
Date:
12/16/09 12:57 AM
To:
ruby-ffi@googlegroups.com

Hi Victor,

On Dec 15, 2009, at 10:21 PM, Victor Costan wrote:
> Is it feasible to make "FFI.add_sys_types" available on all platforms
> if it's implemented at runtime?
> 
> I'm thinking ideally the ffi gem will come prebuilt, at least for OSX
> and Windows, so users might not have Xcode / mingw / Vistual Studio.
> To me, the biggest advantage of using ffi is not having to deal with
> all the extension building stuff on a per-gem basis.

I'm pretty sure the "alternate" Ruby implementations (JRuby, Rubinius, MacRuby) will provide FFI as part of their core packages.  Whether MRI 1.9 is harder to say, but one can hope.

However, there's still the issue that any gems which use FII still need an underlying C library. For cases where the gem is just a wrapper around a commonly used library that is already installed (e.g., libxml on Mac OS X) that would avoid the need for a compiler.  However, for less common libraries (e.g., redis), and especially on Windows, I'm afraid you'll still need a compiler to get all the goodies. :-(

-- Ernie P.