From: Rajinder Yadav Date: 2009-09-28T11:32:22+09:00 Subject: Re: calling 'C' code from Ruby Aaron Patterson wrote: > If you write your extension in C, it won't work with JRuby. I find FFI > / dl to be infuriatingly difficult to debug at times. Also when > distributing a DL/FFI gem, you need to teach your users how to set > LD_LIBRARY_PATH. Your extension performance will be faster if you write > in C. With FFI/DL, it takes more time to call C functions. > > I can go on, but my general rule of thumb is if you're wrapping only a > handful of functions, use FFI. If you're wrapping a complex library, > use C. Hi Aaron. thank you for the feedback. This is really good to know, definitely helpful in terms of the thing I want to avoid. Hopeful it's not to difficult to get a "hello world" first step going =P I guess I also want to evaluate/determine which technique is really efficient with passing large pools of data between C and Ruby. > --- > Aaron Patterson > http://tenderlovemak -- Kind Regards, Rajinder Yadav http://DevMentor.org Do Good ~ Share Freely