Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows integration #2

Open
raeisimv opened this issue Aug 11, 2024 · 1 comment
Open

Windows integration #2

raeisimv opened this issue Aug 11, 2024 · 1 comment

Comments

@raeisimv
Copy link

The crate cannot be used on the Windows operating system due to UnixStream usage.
In the connection.rs file, for example, there is an import that is not valid on the Windows (non-unix) platforms:

// connection.rs
use std::{
    any::{Any, TypeId},
    io::{self, Read, Write},
    net::{SocketAddr, TcpStream},
    os::unix::net::UnixStream, // <--------------------- is not valid on non-Unix OS
    time::Duration,
};

Output error:

cargo run 
   Compiling touche v0.0.9
error[E0433]: failed to resolve: could not find `unix` in `os`                                                                                                                                                                       
  --> C:\Users\###\.cargo\registry\src\index.crates.io-6f17d22bba15001f\touche-0.0.9\src\connection.rs:5:9
   |
5  |     os::unix::net::UnixStream,
   |         ^^^^ could not find `unix` in `os`
   |
note: found an item that was configured out
  --> C:\Users\###\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:26:9
   |
26 | pub mod unix {}
   |         ^^^^
note: found an item that was configured out
  --> C:\Users\###\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\os\mod.rs:64:9
   |
64 | pub mod unix;
   |         ^^^^
                                                                                                                                                                                              
For more information about this error, try `rustc --explain E0433`.                                                                                                                                            
error: could not compile `touche` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
@reu
Copy link
Owner

reu commented Aug 23, 2024

Hey @raeisimv, thanks for the report! I just released a version where UDS are now an optional feature. I didn't have the chance yet to test on Windows, but it should be working. Let me know if it doesn´t!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants