When I try to install in vs code...I face this error

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\lib.rs:24:9
|
24 | pub use sys::size::terminal_size;
| ^^^ maybe a missing crate sys?

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\lib.rs:27:9
|
27 | pub use sys::tty::{is_tty, get_tty};
| ^^^ maybe a missing crate sys?

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\async.rs:5:5
|
5 | use sys::tty::get_tty;
| ^^^ maybe a missing crate sys?

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\raw.rs:28:5
|
28 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
| ^^^ maybe a missing crate sys?

error[E0432]: unresolved import sys
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\raw.rs:29:5
|
29 | use sys::Termios;
| ^^^ maybe a missing crate sys?

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
error: could not compile termion due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile aptos v0.2.6 (https://github.com/aptos-labs/aptos-core.git?branch=devnet#509f09e7), intermediate artifacts can be found at C:\Users\DELL\AppData\Local\Temp\cargo-installstE1Dp

termion does not support Windows. You can try using crossterm instead.

How can I install or implement this @kpreid ..

Now also I face this error

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\lib.rs:24:9
|
24 | pub use sys::size::terminal_size;
| ^^^ maybe a missing crate sys?
|
= help: consider adding extern crate sys to use the sys crate

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\lib.rs:27:9
|
27 | pub use sys::tty::{is_tty, get_tty};
| ^^^ maybe a missing crate sys?
|
= help: consider adding extern crate sys to use the sys crate

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\async.rs:5:5
|
5 | use sys::tty::get_tty;
| ^^^ maybe a missing crate sys?
|
= help: consider adding extern crate sys to use the sys crate

error[E0433]: failed to resolve: maybe a missing crate sys?
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\raw.rs:28:5
|
28 | use sys::attr::{get_terminal_attr, raw_terminal_attr, set_terminal_attr};
| ^^^ maybe a missing crate sys?
|
= help: consider adding extern crate sys to use the sys crate

error[E0432]: unresolved import sys
--> C:\Users\DELL.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.6\src\raw.rs:29:5
|
29 | use sys::Termios;
| ^^^ maybe a missing crate sys?
|
= help: consider adding extern crate sys to use the sys crate

Compiling which v4.2.5
Some errors have detailed explanations: E0432, E0433.
For more information about an error, try rustc --explain E0432.
error: could not compile termion due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile aptos v0.2.6 (https://github.com/aptos-labs/aptos-core.git?branch=devnet#509f09e7), intermediate artifacts can be found at C:\Users\DELL\AppData\Local\Temp\cargo-install1wUBNT

Whatever code you are trying to compile (aptos?) needs to be modified to use crossterm instead of termion. This is not a configuration change; it is modifying the code.

I had initially assumed you were writing code but now it sounds like you're compiling another crate that you didn't write.

You can find out where the termion dependency is by running cargo tree --invert termion, which will list dependency links starting from termion and ending at what you asked to compile. You should also check if the crate has a feature that can be disabled to avoid the dependency (this will require reading the involved Cargo.tomls).

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.