os-detect-aosc

Crates.ioos-detect-aosc
lib.rsos-detect-aosc
version
sourcesrc
created_at2025-03-29 17:54:18.999685+00
updated_at2025-03-29 18:03:49.426365+00
descriptionDetect an OS installed on a partition (fork from pop-os/distinst)
homepage
repositoryhttps://github.com/aosc-dev/os-detect
max_upload_size
id1611489
Cargo.toml error:TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Mag Mell (eatradish)

documentation

README

os-detect

Rust crate for detecting the existence of an OS from an unmounted device, or path.

use os_detect::detect_os_from_device;
use std::path::Path;

pub fn main() {
    let device_path = &Path::new("/dev/sda3");
    let fs = "ext4";
    if let Some(os) = detect_os_from_device(device_path, fs) {
        println!("{:#?}", os);
    }
}
Commit count: 0

cargo fmt