Crates.io | host_discovery |
lib.rs | host_discovery |
version | 2.0.2 |
source | src |
created_at | 2023-11-24 20:22:23.604862 |
updated_at | 2024-06-22 03:31:23.19112 |
description | A simple Rust crate for host discovery |
homepage | |
repository | https://github.com/v0idmatr1x/host_discovery |
max_upload_size | |
id | 1047621 |
size | 6,738 |
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