osinfo

Crates.ioosinfo
lib.rsosinfo
version1.0.0
created_at2025-05-23 12:59:03.857841+00
updated_at2025-05-23 12:59:03.857841+00
descriptionDetect the operating system type and version.
homepage
repositoryhttps://github.com/codex-jignesh/osinfo
max_upload_size
id1686278
size39,171
(codex-jignesh)

documentation

README

osinfo

Overview

Rust library project used to get operating system detail.

Library (osinfo)

osinfo usage

To use this crate, add osinfo as a dependency to your project's Cargo.toml:

[dependencies]
osinfo = "1"

Example

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());

License

osinfo is licensed under the MIT license. See (LICENSE) for the details.

Commit count: 5

cargo fmt