It’s a little late, but there’s a builtin way to detect the OS using the std lib. Eg:
use std::env;
println!("{}", env::consts::OS); // Prints the current OS.
The possible values are described here
Hope this help somebody in the future.
It’s a little late, but there’s a builtin way to detect the OS using the std lib. Eg:
use std::env;
println!("{}", env::consts::OS); // Prints the current OS.
The possible values are described here
Hope this help somebody in the future.