platform_info/
lib_impl.rs#![warn(unused_results)] #[cfg(target_os = "windows")]
use std::path::Path;
#[cfg(target_os = "windows")]
use std::path::PathBuf;
pub type ThreadSafeStdError = dyn std::error::Error + Send + Sync;
pub type BoxedThreadSafeStdError = Box<ThreadSafeStdError>;
#[cfg(target_os = "windows")]
type PathStr = Path;
#[cfg(target_os = "windows")]
type PathString = PathBuf;
const HOST_OS_NAME: &str = if cfg!(all(
target_os = "linux",
any(target_env = "gnu", target_env = "")
)) {
"GNU/Linux"
} else if cfg!(all(
target_os = "linux",
not(any(target_env = "gnu", target_env = ""))
)) {
"Linux"
} else if cfg!(target_os = "android") {
"Android"
} else if cfg!(target_os = "windows") {
"MS/Windows" } else if cfg!(target_os = "freebsd") {
"FreeBSD"
} else if cfg!(target_os = "netbsd") {
"NetBSD"
} else if cfg!(target_os = "openbsd") {
"OpenBSD"
} else if cfg!(target_vendor = "apple") {
"Darwin"
} else if cfg!(target_os = "fuchsia") {
"Fuchsia"
} else if cfg!(target_os = "redox") {
"Redox"
} else if cfg!(target_os = "illumos") {
"illumos"
} else if cfg!(target_os = "solaris") {
"solaris"
} else {
"unknown"
};
#[cfg(unix)]
#[path = "platform/unix.rs"]
mod target;
#[cfg(windows)]
#[path = "platform/windows.rs"]
mod target;
#[cfg(not(any(unix, windows)))]
#[path = "platform/unknown.rs"]
mod target;
pub use target::*;