is-wsl 0.4.0

Checks if the process is running inside Windows Subsystem for Linux.
Documentation
1
2
3
4
5
6
7
8
extern crate is_wsl;
fn main() {
    if is_wsl::is_wsl() {
        println!("Currently in WSL")
    } else {
        println!("Currently NOT in WSL")
    }
}