spider-gazelle/ssh2.cr

Cannot compile for Windows

vitobotta opened this issue · 3 comments

Hi! First of all thanks for this awesome library, works like a charm!

I am trying to build a Windows executable from my Mac, but I get errors related to macros that do something specific if the architecture of the OS is Darwin/macOS. Is there any workaround for this that would allow me to compile for Windows? Thanks in advance!

I think there are two issues currently with having this work on windows.

Firstly, we're using some undocumented hooks into the event scheduler
and your observation is correct as that file is skipped for win32.

Secondly, I think there are some behavioral differences in the library itself between *nix and windows.
As basically the library handles the IO and just raises issues if it would block. But pretty sure win32 does something different?

Happy to accept pull requests

Hi @stakach and thanks for the so quick response! I am still new to Crystal so I may not be able (just yet) to do a PR for this. For the time being users of my tool can just use the Linux binary under WSL I guess, since they are developers anyway. Thanks!

probably worth keeping open for prosperity