Skip to content

Make kibi compatible with Windows 10 #9

Description

@codingonHP

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions