darra-ethercat-master 2.7.0

Commercial EtherCAT master protocol stack, real-time kernel driver integration, Windows and Linux support, multi-language SDKs, complex topology and hot-plug support.
Documentation

#[cfg(target_os = "windows")]
pub fn is_running_as_admin() -> bool {

    false
}

#[cfg(not(target_os = "windows"))]
pub fn is_running_as_admin() -> bool {

    unsafe { libc::geteuid() == 0 }
}

pub fn get_system_version() -> String {
    #[cfg(target_os = "windows")]
    {

        format!("Windows {}", std::env::consts::ARCH)
    }
    #[cfg(not(target_os = "windows"))]
    {
        format!("Linux {}", std::env::consts::ARCH)
    }
}