Windows support
Please support the Windows console. Please think about how you're going to support it before you commit to certain API design choices. In order to provide formatting in the Windows console, you have to control how stuff is written to the console. println! will not work. No ansi escape codes (unless you're on Windows 10 with a certain console mode enabled, which offers some escape codes).
That's a very good point @retep998. Unfortunately, I'm not very familiar with formatting in the Windows console. Do you know of any good resources?
Well, I am actually working on an API for interacting with the console in wio. You can see an example of it here.
Basically the console is just a 2D grid buffer of u16 characters and each cell has a background and a foreground color (you can only choose from a palette of 16 colors although that palette can be any 24-bit RGB colors you want), no other formatting. Note that you can create multiple such buffers with different sizes and palettes and swap between them easily, but only one buffer is active (visible) at a given time. All output is done by interacting with such a buffer through API calls.
@retep998, do you think it'd be possible to implement Windows support in termion? I'm not sure what features it currently supports (and which of these are available on Windows).
@killercup Look at the code from the example.
let stdout = io::stdout();
let mut stdout = stdout.lock();
stdout.color(color::Red).unwrap();
In order to do colors in the windows console you need the stdout handle. Unfortunately libstd does not allow access to the underlying handle. As a result, this API as it stands right now is not compatible with the windows console. If you get the handle via GetStdHandle, then it isn't compatible with libtest stdout redirection, and also would require flushing rust's stdout before each windows console api function.