-
Notifications
You must be signed in to change notification settings - Fork 2
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
Windows support #9
Comments
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 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. |
@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 |
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).The text was updated successfully, but these errors were encountered: