std::env::consts

Constant OS

1.0.0 ยท source
pub const OS: &str;
Expand description

A string describing the specific operating system in use. An example value may be: "linux", or "freebsd".

Full list of possible values
  • "linux"
  • "windows"
  • "macos"
  • "android"
  • "ios"
  • "openbsd"
  • "freebsd"
  • "netbsd"
  • "wasi"
  • "hermit"
  • "aix"
  • "apple"
  • "dragonfly"
  • "emscripten"
  • "espidf"
  • "fortanix"
  • "uefi"
  • "fuchsia"
  • "haiku"
  • "hermit"
  • "watchos"
  • "visionos"
  • "tvos"
  • "horizon"
  • "hurd"
  • "illumos"
  • "l4re"
  • "nto"
  • "redox"
  • "solaris"
  • "solid_asp3
  • "vita"
  • "vxworks"
  • "xous"