cetra3 / tmq

Rust ZeroMQ bindings for Tokio
151 stars 28 forks source link

Windows Support Not Implemented #17

Open mikart143 opened 4 years ago

mikart143 commented 4 years ago

Hello! During building the git/crates.io version of tmq I occured an error:

   Compiling tmq v0.2.1 (https://github.com/cetra3/tmq#455d9254)
error[E0432]: unresolved import `mio::unix`
 --> C:\Users\mikar\.cargo\git\checkouts\tmq-34da698a4e28e3cb\455d925\src\socket.rs:3:11
  |
3 | use mio::{unix::EventedFd, Evented, Poll, PollOpt, Ready, Token};
  |           ^^^^ could not find `unix` in `mio`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `tmq`.

My platfrom is Windows with msvc toolchain. I did not found anywhere that tmq is not supported on Windows. How can I ommit this ?

cetra3 commented 4 years ago

Yeah at the moment support for windows is not great. We're basically using the epoll system to register events to listen to which isn't on windows. There is talk of using wepoll in some way to assist with this. I'm not sure how widespread support is.

The main problem is the windows API is fairly different for registering events. I'd love it if someone could take the reigns and implement it, but it would basically need to be a windows specific write for socket.rs

mikart143 commented 4 years ago

Thanks for the info !

bicarlsen commented 1 year ago

Was thinking of giving this a go. Would tokio's NamedPipes be a valid solution here?

bicarlsen commented 1 year ago

Gave this a first attempt. Would love some feedback if anybody has some. Some of the tests fail, mostly with access denied style errors.