[Win32utils-devel] Comments for Daniel Berger blog post

Luis Lavena luislavena at gmail.com
Fri Aug 7 19:16:41 EDT 2009

Hey Daniel,

I'm trying to leave you a comment on this article you wrote:


But since you disabled OpenID and anonyous, I'm not fond to register
for another account just to reply your comments.

Quoting your post:

Unfortunately, I've slammed into the cold hard fact that FFI just
isn't the grand solution we all hoped it would be. The first problem
is that libffi, the underlying source for C based implementations,
isn't going to build without the gcc toolchain. That pretty much
leaves everyone but Linux, FreeBSD and OS X in the dust, including two
heavy hitters, MS Windows and Solaris (if you're using the Sun Studio

That is incorrect. Ruby-FFI team worked and integrated rake-compiler
project in the build process to be able to deliver a binary gem that
install and run flawlessly on both mswin32 (VC6) and mingw32 (GCC).


If you're asking to build it against Visual Studio, of course it will
fail, but I suggest you send patches to improve that process, it is
now on GitHub:


Then there's the issue of JRuby's lack of support for certain parts of
C, such as file descriptors, as my attempt to port file-temp

You have a point over there, but transfering file descriptors across
implementations would be impossible, because that would remove the
safe lock around the whole managed idea.

What about IronRuby? They would face the same issue with file descriptors.

So now I'm in a dilemma. If I want to write cross-platform code that
will work with JRuby and C based implementations, I'm relegated to
keeping two (or more) separate source files, one for MRI and one for
JRuby. It would more likely be 3, as I'll still need a separate source
file for Windows, since the code is radically different from its *nix
counterpart most of the time.

Why so? I mean, you can have several files in the same gem that, based
on the platform, get required independently. Perhaps I'm missing your
point, but would love to explore the issue you're facing to help you
find the balance and a solution

On top of that I've heard disturbing reports that there is little
interest in supporting FFI on Windows, in which case we may as well
declare it dead in the water. Whether you like it or not, Windows is a
major player and its here to stay. If it's not going to work on
Windows you may as well chuck it now and stick with C extensions.

You can't impose the platform to anyone, even less in the OpenSource
community. That's why I've created rake-compiler to help them support

Now that FFI builds with RubyInstaller and DevKit, bug and patches can
be provided by other developers. FFI team announced there will be no
official support since the core team doesn't run Windows, but that
doesn't mean they are not fond to integrate these changes.

Wonder why your negative comment about it or if you haven't heard the
news about Ruby-ffi 0.4.0 release with native gems for mingw32 and
Luis Lavena
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

More information about the win32utils-devel mailing list