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 support? #35

Open
nirenyang opened this issue Apr 6, 2023 · 1 comment
Open

windows support? #35

nirenyang opened this issue Apr 6, 2023 · 1 comment

Comments

@nirenyang
Copy link

rustc 1.70.0-nightly (2eaeb1eee 2023-04-05)

error[E0433]: failed to resolve: could not find unix in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:132:14
|
132 | use std::os::unix::io::RawFd;
| ^^^^ could not find unix in os

error[E0432]: unresolved import libc::pid_t
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:134:18
|
134 | use libc::{c_int,pid_t};
| ^^^^^ no pid_t in the root

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:136:15
|
136 | pub use ::os::target::{cc_t,speed_t,tcflag_t}; // types
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:137:15
|
137 | pub use ::os::target::{VEOF,VEOL,VERASE,VINTR,VKILL,VMIN,VQUIT,VSTART,VSTOP,VSUSP,VTIME}; // c_cc subscripts
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:138:15
|
138 | pub use ::os::target::{BRKINT,ICRNL,IGNBRK,IGNCR,IGNPAR,INLCR,INPCK,ISTRIP,IXANY,IXOFF,IXON,PARMRK}; // input modes
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:139:15
|
139 | pub use ::os::target::{OPOST,ONLCR,OCRNL,ONOCR,ONLRET}; // output modes
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:140:15
|
140 | pub use ::os::target::{B0,B50,B75,B110,B134,B150,B200,B300,B600,B1200,B1800,B2400,B4800,B9600,B19200,B38400}; // baud rate s...
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:141:15
|
141 | pub use ::os::target::{CSIZE,CS5,CS6,CS7,CS8,CSTOPB,CREAD,PARENB,PARODD,HUPCL,CLOCAL}; // control modes
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:142:15
|
142 | pub use ::os::target::{ECHO,ECHOE,ECHOK,ECHONL,ICANON,IEXTEN,ISIG,NOFLSH,TOSTOP}; // local modes
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:143:15
|
143 | pub use ::os::target::{TCSANOW,TCSADRAIN,TCSAFLUSH}; // attribute selection
| ^^^^^^ could not find target in os

error[E0432]: unresolved import os::target
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:144:15
|
144 | pub use ::os::target::{TCIFLUSH,TCIOFLUSH,TCOFLUSH,TCIOFF,TCION,TCOOFF,TCOON}; // line control
| ^^^^^^ could not find target in os

error[E0432]: unresolved import libc::pid_t
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:3:18
|
3 | use libc::{c_int,pid_t};
| ^^^^^ no pid_t in the root
|
= help: consider importing this unresolved item instead:
pid_t

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:7:55
|
7 | pub fn tcgetattr(fd: c_int, termios_p: *mut ::os::target::termios) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:8:82
|
8 | pub fn tcsetattr(fd: c_int, optional_actions: c_int, termios_p: *const ::os::target::termios) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:14:44
|
14 | pub fn cfmakeraw(termios_p: *mut ::os::target::termios);
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:15:48
|
15 | pub fn cfgetispeed(termios_p: *const ::os::target::termios) -> ::os::target::speed_t;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:15:74
|
15 | pub fn cfgetispeed(termios_p: *const ::os::target::termios) -> ::os::target::speed_t;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:16:48
|
16 | pub fn cfgetospeed(termios_p: *const ::os::target::termios) -> ::os::target::speed_t;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:16:74
|
16 | pub fn cfgetospeed(termios_p: *const ::os::target::termios) -> ::os::target::speed_t;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:17:46
|
17 | pub fn cfsetispeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:17:76
|
17 | pub fn cfsetispeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:18:46
|
18 | pub fn cfsetospeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:18:76
|
18 | pub fn cfsetospeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:20:45
|
20 | pub fn cfsetspeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\ffi.rs:20:75
|
20 | pub fn cfsetspeed(termios_p: *mut ::os::target::termios, speed: ::os::target::speed_t) -> c_int;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:187:18
|
187 | inner: ::os::target::termios
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:203:31
|
203 | fn inner(&self) -> &::os::target::termios {
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:207:43
|
207 | fn inner_mut(&mut self) -> &mut ::os::target::termios {
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:213:25
|
213 | type Target = ::os::target::termios;
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:215:31
|
215 | fn deref(&self) -> &::os::target::termios {
| ^^^^^^ could not find target in os

error[E0433]: failed to resolve: could not find target in os
--> C:\Users\hello.cargo\registry\src......\termios-0.3.3\src\lib.rs:221:43
|
221 | fn deref_mut(&mut self) -> &mut ::os::target::termios {
| ^^^^^^ could not find target in os

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
error: could not compile termios (lib) due to 31 previous errors

@nospam3089
Copy link

Quoting the very first sentence from README.md:

The termios crate provides safe bindings for the Rust programming language to the terminal I/O interface implemented by Unix operating systems.

I other words; Attempting to build for Windows should be expected to fail since it is in no sense a Unix operating system.

There is a StackExchange thread at: https://stackoverflow.com/q/933745/windows-equivalent-to-termios with two answers which seems to be appropriate reading.

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