#linux #os #release

os-release

Parse /etc/os-release files on Linux distributions

1 unstable release

0.1.0 Nov 2, 2018

#10 in #release

Download history 15/week @ 2018-11-07 4/week @ 2018-11-14 4/week @ 2018-11-21 3/week @ 2018-11-28 7/week @ 2018-12-05 4/week @ 2018-12-12 4/week @ 2018-12-19 11/week @ 2018-12-26

3 downloads per month

MIT license

8KB
160 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

~14KB