lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi All,

I was going to send this to the cqueues/lua-http maintainers, but I thought there might be others who could provide input to the problem. I've long had a desire to see lua-http on Windows and Daurnimators message that luaossl is now on Windows prompted me to speak up. I haven't been successful yet, but it's moving forward.

The cqueues author William Ahern made the suggestion to use wepoll[1]  to replace epoll in cqueues[2] on Windows. My working assumption (from Mr. Ahern) is that if I can get the base cqueues/src/lib/ library working with sockets, we have a fair shot of getting lua-http on Windows. So, this effort is strictly about compiling src/lib so far.

I included wepoll.c/h and queue.h (from freebsd 10) in kpoll.c, which seems to be the guts of the polling library. Much of the epoll calls compile(?), but the code paths defined under PORTS and #else don't compile so I've just commented them all out (whack!). I've included a git patch and my build output can be found here: https://pastebin.com/9hLSpzGL.

I'm using a build tool called JamPlus to compile on the command line[3] against mscv++ 2017[4]. Note the jam file, which is the build instructions. I still suck at Jam and I haven't had any success with the Lua interface, but I have some working examples and it seems quite powerful.

In terms of the problems in the compiling, I haven't approached the missing strings.h (dns.c) or sys/select.h yet. 

Any input would be appreciated. If this effort interests you, please let me know and I'll spend more time at this problem. 

Cheers, 
Russ

[1] https://github.com/wahern/cqueues
[2] https://github.com/piscisaureus/wepoll

[3] JamPlus 
http://jamplus.org
https://github.com/jamplus/jamplus.git
Or it can be installed from here: https://github.com/WinLua/bin/blob/master/WinLua%20Release%202/WinLua%2032%20Bit-2.18.5.3.msi. Note Jam Plus installs and works fine, but WinLua Release 2 is horribly broken. :(

[4] Toolchain can be had for free https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=15 but could technically be replaced with llvm/clang on windows.


Attachment: cqueues.diff
Description: Binary data