Hello Rust community,
[IPC, Windows, NamedPipes, UnixDomainSockets]
I'm very new to Rust and I am currently working on an App, which in future should work on all 3 major platforms [windows, mac, and linux]. One component of the app is the UI using Tauri, and this component should work as a gRPC client which should connect to a Unix Domain Socket created by other process, and should create a bidirectional communication channel. I was able to implement this using tokio
, and tonic
crates for mac/linux.
My issue is working with windows: in using uds_windows crate to get UnixStream, as the implementation
- UnixStream::connect Does not return a Future which seems like an easy enough work around
- after I make a work around for 1, UnixStream doesn't implement AsyncRead and AsyncWrite of tokio::io (i think) which is needed for gRPC client building using tonic.
Then I saw Unix Domain Sockets on Windows · Issue #271 · rust-lang/libs-team · GitHub , so looks like named pipe is the way to go. So I used tokio::net::windows::named_pipe but ran into similar issue while creating gRPC client.
I also came across this issue which is still open where someone is facing the similar issue to implement the same custom traits. How to implement an async read/write incoming stream with tokio named pipe? · Issue #1518 · hyperium/tonic · GitHub
What is the best way forward, could someone suggest a documentation specific to IPC on windows using UDS or NamedPipe? Or what am I doing wrong?
Appreciate your help!