host_discovery

Crates.iohost_discovery
lib.rshost_discovery
version2.0.2
sourcesrc
created_at2023-11-24 20:22:23.604862
updated_at2024-06-22 03:31:23.19112
descriptionA simple Rust crate for host discovery
homepage
repositoryhttps://github.com/v0idmatr1x/host_discovery
max_upload_size
id1047621
size6,738
Chris Paige (V0idMatr1x)

documentation

https://docs.rs/host_discovery

README

A simple Rust crate for host discovery

Basic Usage

use host_discovery::{OSProfile, gpu};

fn main() {
    // linux example
    //let profile = OSProfile::new().linux_distro().build();
    
    // or
    //let profile = OSProfile::new().is_wsl().build();
    let profile = OSProfile::new().win_edition().build();
    let arch = profile.arch;
    let os = profile.os;
    let edition = profile.win_edition;
    let gpu = gpu().expect("Unreachable");

    println!(
        " Architecture: {}\n OS: {}\n Edition: {}\n GPU: {}", 
        arch,
        os,
        edition.unwrap(),
        gpu,
    )
}

Current Features

  • OS
  • Architecture
  • Windows Edition
  • WSL Detection
  • Linux Distro
  • GPU Enumeration
Commit count: 180

cargo fmt