| Crates.io | osinfo |
| lib.rs | osinfo |
| version | 1.0.0 |
| created_at | 2025-05-23 12:59:03.857841+00 |
| updated_at | 2025-05-23 12:59:03.857841+00 |
| description | Detect the operating system type and version. |
| homepage | |
| repository | https://github.com/codex-jignesh/osinfo |
| max_upload_size | |
| id | 1686278 |
| size | 39,171 |
Rust library project used to get operating system detail.
osinfo)osinfo usageTo use this crate, add osinfo as a dependency to your project's Cargo.toml:
[dependencies]
osinfo = "1"
use osinfo;
let info = osinfo::get();
// Print full information:
println!("OS information: {info}");
println!("ID: {}", info.get_id());
println!("Name: {}", info.get_name());
println!("Version: {}", info.get_version());
println!("Variant: {}", info.get_variant());
println!("Edition: {}", info.get_edition());
println!("Codename: {}", info.get_codename());
osinfo is licensed under the MIT license. See (LICENSE) for the details.