You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to build kibi for Windows 10 but it fails with compilation errors.
Can you please help.
Rust Info
cargo 1.43.0-nightly (3c53211c3 2020-02-07)
rustc 1.43.0-nightly (e620d0f33 2020-02-18)
Windows Info
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19041 N/A Build 19041
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
Compiler output
$ cargo build --release --locked --all-features
Compiling kibi v0.1.2 (C:\Users\vanand\kibi\kibi)
error[E0433]: failed to resolve: could not find `sys` in `nix`
--> src\editor.rs:6:10
|
6 | use nix::sys::termios::Termios;
| ^^^ could not find `sys` in `nix`
error[E0432]: unresolved imports `signal_hook::iterator`, `signal_hook::SIGWINCH`
--> src\editor.rs:7:19
|
7 | use signal_hook::{iterator::Signals, SIGWINCH};
| ^^^^^^^^ ^^^^^^^^ no `SIGWINCH` in the root
| |
| could not find `iterator` in `signal_hook`
error[E0432]: unresolved imports `libc::STDIN_FILENO`, `libc::STDOUT_FILENO`, `libc::TIOCGWINSZ`, `libc::VMIN`, `libc::VTIME`
--> src\terminal.rs:3:12
|
3 | use libc::{STDIN_FILENO, STDOUT_FILENO, TIOCGWINSZ, VMIN, VTIME};
| ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^ ^^^^ ^^^^^
| | | | | |
| | | | | no `VTIME` in the root
| | | | | help: a similar name exists in the module: `ETIME`
| | | | no `VMIN` in the root
| | | no `TIOCGWINSZ` in the root
| | no `STDOUT_FILENO` in the root
| no `STDIN_FILENO` in the root
error[E0432]: unresolved imports `nix::pty`, `nix::sys`
--> src\terminal.rs:4:11
|
4 | use nix::{pty::Winsize, sys::termios};
| ^^^ ^^^ could not find `sys` in `nix`
| |
| could not find `pty` in `nix`
error[E0433]: failed to resolve: could not find `ioctl_read_bad` in `nix`
--> src\terminal.rs:35:10
|
35 | nix::ioctl_read_bad!(get_ws, TIOCGWINSZ, Winsize);
| ^^^^^^^^^^^^^^ could not find `ioctl_read_bad` in `nix`
error[E0412]: cannot find type `Termios` in this scope
--> src\editor.rs:109:19
|
109 | orig_termios: Termios,
| ^^^^^^^ not found in this scope
error[E0412]: cannot find type `Error` in crate `nix`
--> src\error.rs:8:14
|
8 | Nix(nix::Error),
| ^^^^^ not found in `nix`
|
help: possible candidates are found in other modules, you can import them into scope
|
3 | use core::fmt::Error;
|
3 | use crate::error::Error;
|
3 | use std::error::Error;
|
3 | use std::fmt::Error;
|
and 1 other candidate
error[E0412]: cannot find type `Error` in crate `nix`
--> src\error.rs:33:16
|
33 | impl From<nix::Error> for Error {
| ^^^^^ not found in `nix`
|
help: possible candidates are found in other modules, you can import them into scope
|
3 | use core::fmt::Error;
|
3 | use crate::error::Error;
|
3 | use std::error::Error;
|
3 | use std::fmt::Error;
|
and 1 other candidate
error[E0412]: cannot find type `Error` in crate `nix`
--> src\error.rs:35:23
|
35 | fn from(err: nix::Error) -> Self { Self::Nix(err) }
| ^^^^^ not found in `nix`
|
help: possible candidates are found in other modules, you can import them into scope
|
3 | use core::fmt::Error;
|
3 | use crate::error::Error;
|
3 | use std::error::Error;
|
3 | use std::fmt::Error;
|
and 1 other candidate
error[E0412]: cannot find type `Error` in crate `nix`
--> src\terminal.rs:8:71
|
8 | pub(crate) fn set_termios(term: &termios::Termios) -> Result<(), nix::Error> {
| ^^^^^ not found in `nix`
|
help: possible candidates are found in other modules, you can import them into scope
|
1 | use core::fmt::Error;
|
1 | use crate::error::Error;
|
1 | use std::error::Error;
|
1 | use std::fmt::Error;
|
and 1 other candidate
error[E0425]: cannot find function `get_ws` in this scope
--> src\terminal.rs:43:14
|
43 | unsafe { get_ws(STDOUT_FILENO, maybe_ws.as_mut_ptr()).ok().map(|_| maybe_ws.assume_init()) }
| ^^^^^^ not found in this scope
error: aborting due to 11 previous errors
The text was updated successfully, but these errors were encountered:
using ANSI escape sequences if the ioctl method fails
Signal handling for SIGWINCH to know when the terminal has been resized
Windows 10
Enabling / disabling raw mode (1.) is necessary to be able to use a text editor. I think one of the crates that safely wrap winapi::um::consoleapi::SetConsoleMode could be used.
Obtaining the terminal size (2.) could potentially work using ANSI escape sequences with recent versions of Windows 10 that support them (since version 1511, released in November 2015). This method is currently implemented in kibi as get_window_size_v2.
Automatic resize of the terminal window (3.) is nice, but it could be disabled for Windows until an alternative is implemented.
Windows 7
If I understand correctly, Windows 7 cannot handle ANSI escape sequences, so I'm not sure if it could work without a major change.
Hi,
I am trying to build kibi for Windows 10 but it fails with compilation errors.
Can you please help.
Rust Info
Windows Info
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19041 N/A Build 19041
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
Compiler output
The text was updated successfully, but these errors were encountered: