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

Test/add Windows support #8

Open
hugows opened this issue Jan 9, 2017 · 7 comments
Open

Test/add Windows support #8

hugows opened this issue Jan 9, 2017 · 7 comments

Comments

@hugows
Copy link

hugows commented Jan 9, 2017

Hi,
since this is written in a modern language, I had the expectation it would work on Windows as well.

@spacejam
Copy link
Member

I'll fire up windows today and get it working!

@hugows
Copy link
Author

hugows commented Jan 10, 2017 via email

@spacejam
Copy link
Member

termion claims it will work on any system with an ansi terminal, so later today I'll try it out on bash for windows

@hugows
Copy link
Author

hugows commented Jan 10, 2017 via email

@TheZalli
Copy link

TheZalli commented Jan 19, 2017

I tried installing this to my windows using cargo install with git bash but with no luck.

Here's the error message:

error[E0432]: unresolved import `libc::termios`
 --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\termios.rs:4:9
  |
4 | pub use libc::termios as Termios;
  |         ^^^^^^^^^^^^^^^^^^^^^^^^ no `termios` in `libc`

error[E0432]: unresolved import `libc::ioctl`
  --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\size.rs:50:9
   |
50 |     use libc::ioctl;
   |         ^^^^^^^^^^^ no `ioctl` in `libc`

error[E0432]: unresolved import `libc::STDOUT_FILENO`
  --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\size.rs:51:9
   |
51 |     use libc::STDOUT_FILENO;
   |         ^^^^^^^^^^^^^^^^^^^ no `STDOUT_FILENO` in `libc`

error[E0432]: unresolved import `std::os::unix::io::AsRawFd`
 --> C:\Users\mrZalli\.cargo\registry\src\github.com-1ecc6299db9ec823\termion-1.1.4\src\tty.rs:2:5
  |
2 | use std::os::unix::io::AsRawFd;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `unix` in `std::os`

error: cannot continue compilation due to previous error

   Compiling getopts v0.2.14
Build failed, waiting for other jobs to finish...
error: failed to compile `voidmap v0.4.4`, intermediate artifacts can be found at `C:\Users\mrZalli\AppData\Local\Temp\cargo-install.ShnNPDqXuQie`

Caused by:
  Could not compile `termion`.

To learn more, run the command again with --verbose.

@spacejam
Copy link
Member

@mrZalli thank you for testing this out! it seems like I should investigate alternative terminal libraries. I use pretty basic functionality, so another one may be able to be swapped in without too much effort.

@spacekookie spacekookie changed the title Add to documentation that the program works on Linux-alike only Test/add Windows support Feb 8, 2019
@pmf
Copy link

pmf commented Mar 11, 2020

To whom it may interest: I had a rough try at porting void to crossterm (for native, non-WSL Windows support) here: https://github.com/pmf/void/tree/crossterm-for-windows-support

Issues that I'll still have to handle:

  • some ugliness in function signatures introduced due to my unfamiliarity with Rust
  • I had to dumb down the "atomic saving" feature because Windows complained about locking
  • the "open in external editor" feature does not work

Would be good if someone who is more familiar with void could try it out and compare performance under Linux (I've just compared the Linux termios and crossterm versions in a VM, and not with large files) and check what other features might be broken that I do not know of.

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

No branches or pull requests

5 participants