Crates.io | host_discovery |
lib.rs | host_discovery |
version | 2.1.6 |
source | src |
created_at | 2023-11-24 20:22:23.604862 |
updated_at | 2024-11-25 19:35:50.187849 |
description | A simple Rust crate for host discovery |
homepage | |
repository | https://github.com/chrispaig3/host_discovery |
max_upload_size | |
id | 1047621 |
size | 12,522 |
This library is a work in progress
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,
)
}
Current Features