jashkenas / ruby-processing

Code as Art, Art as Code. Processing and Ruby are meant for each other.
http://github.com/jashkenas/ruby-processing/wikis
Other
1.28k stars 94 forks source link

Can I load shared libraries with FFI? #35

Closed utgarda closed 11 years ago

utgarda commented 13 years ago

Hi! Is it possible to use additional ruby gems somehow or load shared libraries (.so , .dll) ?

Some time ago I tried that, but had to pack it all into the big jruby-all.jar , so that was unusable with default distribution of ruby-processing.

monkstone commented 11 years ago

To use rubygems with jruby it is normal to install the gems with jruby (these get placed differently from regular installed gems) there can be issues with native libraries see https://github.com/jruby/jruby/wiki/C-Extension-Alternatives. However it is possible to install the ffi-java gem using jruby


jruby -S gem install ffi

installs java ffi, I've yet to test it in earnest. @utgarda if you are still interested in ruby-processing you might care to try my development version here https://github.com/monkstone/ruby-processing

utgarda commented 11 years ago

Thanks!