Closed mperham closed 5 years ago
To be clear of my goal, I want to run an async-dns server in pure Ruby mode for serving a low-traffic application.
I got something working by forking, removing all extension references and overriding that gem with my forked version:
source 'https://rubygems.org'
gem 'nio4r', github: "mperham/nio4r"
gem 'rubydns'
Looks like all other dependencies are pure Ruby so thank you for that! đź‘Ź
Unless we provide somehow multiple gems, e.g. nio4r-kqueue
, is it actually possible to do this and also make it easy for users?
What about using FFI?
It’s been a decade since I worked on native stuff. I’m unclear what’s possible these days but it looks like rubygems doesn’t make it easy.
As @ioquatix said, It'd require a separate gem, I think, due to RubyGems limitations.
I'd like to run nio4r-based infrastructure in pure Ruby mode, on machines without a compiler (for security and stability reasons). Is this possible? I don't see any flags for
gem install
which disable the native extension build. Is there an ENV hack or similar?