falcon icon indicating copy to clipboard operation
falcon copied to clipboard

Run Falcon on Windows with graceful degradation of forking, etc.

Open johnnyshields opened this issue 3 years ago • 7 comments

A minority of users run Ruby on the Windows Ruby Installer which targets mingw-x64 architecture. At least in my own case I use this as a convenience in development rather than in actual production.

Puma works on Windows with graceful degradation of features not supported by OS kernel like fork. It would be nice if Falcon could take a similar approach so that Windows users could at least use Falcon in development capacity (i.e. "it can serve single requests ok"). I've noticed the async gems are also failing to install on Windows.

johnnyshields avatar Sep 11 '22 05:09 johnnyshields

Hi @johnnyshields sorry I have not replied sooner, but I have finally got Windows support working on io-event gem: https://github.com/socketry/io-event/actions/runs/3241374541/jobs/5313228043

I also started trying to get UNIXSocket working on Windows which isn't strictly necessary but would be pretty useful: https://github.com/ruby/ruby/pull/6513

Windows support required additional changes to Ruby itself, which are now done and will be released as part of Ruby 3.2 - however I was able to get it working albeit fairly inefficiently on 3.1 - so now I just need to add Windows to the Async test matrix.

I'll try to take a look over that over the next month - in theory I don't think it's too hard but I don't really know sometimes Windows support throws a curve ball.

ioquatix avatar Oct 13 '22 11:10 ioquatix

@ioquatix good to hear from you. That's amazing!! Will check it out when Ruby 3.2 is out in a few months.

johnnyshields avatar Oct 13 '22 11:10 johnnyshields

Checking to see if any progress has been made. I would also like to run Falcon on Windows.

cwkatzmann avatar Jan 30 '23 21:01 cwkatzmann

It's slow but we are making progress, io-event is now supported on Windows. async is to a certain extent but it depends on some core changes to Ruby to make non-blocking IO the default.

ioquatix avatar Jan 30 '23 22:01 ioquatix

Okay thanks. And is that only for Ruby 3.2?

cwkatzmann avatar Jan 31 '23 20:01 cwkatzmann

Yes, and it will probably require Ruby 3.3 on Windows for this all to be supported, although we might be able to make it work on 3.2.

ioquatix avatar Jan 31 '23 21:01 ioquatix

Okay, thanks for the update! looking forward to using this tech on Windows :)

cwkatzmann avatar Feb 01 '23 17:02 cwkatzmann