I have a Rust program that I want to compile for the "windows" subsystem when I'm building it for distribution. Currently I am using this in my main.rs:
#![feature(windows_subsystem)]
#![windows_subsystem = "windows"]
This works, but when I run the tests on a Windows machine, the Windows subsystem does not have access to the console so I cannot see the output. I need to comment out the above lines of code in order to see the result of my tests.
Is there a way to conditionally compile which subsystem I'm running on in order to get the tests to work?