[Rubygems-developers] Native Extensions and Pure Ruby Alternatives (again)
transfire at gmail.com
Mon Nov 19 23:18:15 EST 2007
I'm still trying to figure how to package a project that has native
extensions but also pure ruby fallbacks.
My inclination is to have the gem automatically fallback to pure Ruby
if extension compilation fails. I've even made a patch to RubyGems
that allows for this, via a settable gemspec option. Would others like
to see this in RubyGems? Is it worth my effort to submit the patch?
If not, my only alternative seems to be to separate the native
extension into a different package. However, I would still like others
to be able to add the native extension package as a dependency --but a
non-critical one. That is to say, if the dependency fails to compile,
I don't want it to halt the installation of the primary package. This
is important. ActionMailer depends on TMail. But currently it hauls
around a vendors copy of the pure Ruby version. For it to have an
external dependency instead it must count on TMail be fault tolerant,
and not to derail the installation of Rails.
More information about the Rubygems-developers