os-release

Parse /etc/os-release files on Linux distributions

1 unstable release

Uses old Rust 2015

0.1.0 Nov 2, 2018

#825 in Unix APIs

Download history 2674/week @ 2024-06-19 2410/week @ 2024-06-26 2171/week @ 2024-07-03 2777/week @ 2024-07-10 3693/week @ 2024-07-17 3234/week @ 2024-07-24 2973/week @ 2024-07-31 3223/week @ 2024-08-07 3079/week @ 2024-08-14 3073/week @ 2024-08-21 3771/week @ 2024-08-28 3989/week @ 2024-09-04 3273/week @ 2024-09-11 3888/week @ 2024-09-18 3867/week @ 2024-09-25 3153/week @ 2024-10-02

14,691 downloads per month
Used in 32 crates (13 directly)

MIT license

8KB
172 lines

os-release

Rust crate that provides a type for parsing the /etc/os-release file, or any file with an os-release-like format.

extern crate os_release;

use os_release::OsRelease;
use std::io;

pub fn main() -> io::Result<()> {
    let release = OsRelease::new()?;
    println!("{:#?}", release);
    Ok(())
}

lib.rs:

Type for parsing the /etc/os-release file.

Dependencies

~10KB