61 stable releases

new 2.1.3 Oct 30, 2024
2.0.9 Sep 26, 2024
2.0.2 Jun 22, 2024
1.9.2 Feb 22, 2024
0.5.0 Nov 30, 2023

#226 in Operating systems

Download history 400/week @ 2024-07-25 78/week @ 2024-08-01 254/week @ 2024-08-15 272/week @ 2024-08-22 117/week @ 2024-08-29 27/week @ 2024-09-05 61/week @ 2024-09-12 248/week @ 2024-09-19 259/week @ 2024-09-26 187/week @ 2024-10-03 134/week @ 2024-10-10 164/week @ 2024-10-17 50/week @ 2024-10-24

548 downloads per month

MIT license

10KB
200 lines

This library is a work in progress

A simple Rust crate for host discovery

Basic Usage

use host_discovery::{OSProfile, gpu};

fn main() {
    // linux example
    //let profile = OSProfile::new().distro().build();
    
    // and/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,
    )
}

Roadmap

  • Reduce dependency load by implementing a smaller utility crate for enumerating devices.
    • The implementation should be flexible and cross-platform

Current Features

  • OS
  • Architecture
  • Windows Edition
  • WSL Detection
  • Linux Distro
  • GPU Enumeration
  • CPU Detection

Dependencies

~4–35MB
~536K SLoC