From: Aaron Patterson Date: 2010-03-11T01:46:32+09:00 Subject: [ruby-core:28595] Re: Ruby::DL vs Ruby::FFI On Wed, Mar 10, 2010 at 11:43:20PM +0900, Charles Oliver Nutter wrote: > On Mon, Mar 8, 2010 at 9:56 AM, Aston wrote: > > recently few days back I saw some svn msgs suggesting that DL's dependency > > on libffi was removed, since libffi won't build on windoz (again!). so my > > question is will DL in future be based on libffi ? why just not use FFI. Its > > API and idea is very good and ruby like, against DL's idea of giving in C > > snippets to be interpreted by DL ? > > Why not build DL atop FFI, and get FFI into Ruby 1.9.2? DL is not a subset of FFI. > JRuby already has a partial start on a DL that just uses FFI: > > http://github.com/jruby/jruby/blob/master/lib/ruby/1.8/dl.rb > > and > > http://github.com/jruby/jruby/blob/master/lib/ruby/1.8/dl > > A DL that uses FFI would work without modification or build hassles on > any impl+platform that supports FFI. My fork of Ruby already contains DL built on top of FFI. Unfortunately my patch was rolled out because it doesn't work on Windows with MSVC. We're working on that. :-) You can view my changes here: http://github.com/tenderlove/ruby/commits/ffi -- Aaron Patterson http://tenderlovemaking.com/