wsl

Crates.iowsl
lib.rswsl
version0.1.0
sourcesrc
created_at2019-06-12 19:16:33.480863
updated_at2019-06-12 19:16:33.480863
descriptionDetect if the program is running under Windows Subsystem for Linux
homepage
repositoryhttps://github.com/Dentosal/wsl-rs
max_upload_size
id140648
size3,547
core (github:3a-technologies:core)

documentation

README

Detect if the code is ran under Windows Subsystem for Linux

Usage

wsl::is_wsl() returns true under WSL, false otherwise.

Method

A semi-official source lists some pointers. We are going to use the simplest approach here: Testing if /proc/sys/kernel/osrelease contains string Microsoft or WSL.

Commit count: 2

cargo fmt