From: Luis Lavena Date: 2012-05-09T22:37:35+09:00 Subject: Re: Include C code in a FFI-based gem Denis Defreyne wrote in post #1058861: > Hi, > > I would like to build a gem that contains C source code, but I dont want > to use C extensions. Id like to use FFI instead. Is there a way to build > a shared library usable by FFI when installing a gem? > Take a look on how one of Ruby's own test builds a DLL using extconf.rb: https://github.com/ruby/ruby/blob/trunk/ext/-test-/win32/dln/extconf.rb You can create a shared object for any platform, and during gem install it will be copied to "lib" directory (in theory, haven't tried) Explore that idea and let us know how it goes. Good luck, -- Luis Lavena -- Posted via http://www.ruby-forum.com/.