[Rake-devel] Building native extensions with Rake

Charlie Savage cfis at savagexi.com
Tue Nov 18 13:31:03 EST 2008

Hi Luis,

> I'm working on a series of tasks that ease the compilation of Ruby C
> Extensions with Rake. The goal of these tasks are ease the building
> and compilation of Ruby C extensions, also looking into be
> merged/integrated into Rake.

I really like the idea, but I don't think this is the right way to do 
it.  The fundamental issue with building extensions is Ruby's assumption 
that the compiler used to build ruby itself is the same as the one used 
to build an extension.  On Windows, with MingW and VC++, that is often 
not the case.  Adding a few rake tasks doesn't solve the problem, so 
doesn't make anything any easier.

In my view, the real solution is to port Python's DistUtils to Ruby and 
using it as the standard way of building ruby extensions.  Distutils 
takes a much more object oriented approach than mkmf, so is a lot more 
flexible.  This flexibility allows it to support multiple compilers, and 
from limited experience, it works quite well.

I don't know if the community would be interested in such a big change, 
but I think it would be a big leap forward for Ruby and extensions.


Charlie Savage
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://rubyforge.org/pipermail/rake-devel/attachments/20081118/7aaa2b3a/attachment.bin>

More information about the Rake-devel mailing list