host_discovery 0.1.1

A simple crate for host discovery
Documentation
host_discovery-0.1.1 has been yanked.

A simple rust crate for host discovery

On Crates.io

Todo

  • Add support for WSL detection (is enabled or not)
  • Add support for windows edition detection
  • Add support for public ip detection

Basic Usage

  • Add to your project
cargo add host_discovery

use host_discovery;

fn main() {
    // `detect_os()` Matches against `std::env::consts::OS` then returns the host operating system as a String 
    println!("{}", detect_os()) 
    // `detect_distro()` // Reads & returns the name of the Linux distro as a String from /etc/os-release
    println!("{}", detect_distro()) 
}