#desktop #os #desktop-rs

desktop

Detects the target platform and it’s architecture, vendor and desktop environment

9 releases (stable)

1.0.5 Jan 1, 2019
0.1.2 Oct 10, 2018
0.1.1 Oct 10, 2018
0.1.0 Oct 10, 2018

#40 in Operating systems

Download history 53/week @ 2018-10-06 26/week @ 2018-10-13 17/week @ 2018-10-20 21/week @ 2018-10-27 21/week @ 2018-11-03 29/week @ 2018-11-10 8/week @ 2018-11-17 16/week @ 2018-11-24 14/week @ 2018-12-01 15/week @ 2018-12-08 7/week @ 2018-12-15 22/week @ 2018-12-22 70/week @ 2018-12-29 17/week @ 2019-01-05 17/week @ 2019-01-12

80 downloads per month

Apache-2.0

7KB
100 lines

desktop-rs

A simple and lightweight library that can detect the target platform and it's architecture and desktop environment.
Since 1.0.0 this crate uses the 2018 edition

Build Status

Brief example

Rust 2018

use desktop::Desktop;

fn main() {
    let d = Desktop::get();
    println!("We are running {} architecure {} using the {} desktop", d.os_name(), d.arch(), d.environment())
}

For the 2015 edition just add extern crate desktop; at the top of the file

Documentation

Issues

Feel free to hop over https://github.com/AregevDev/desktop-rs/issues

Licence

Desktop is licenced under the terms of Apache-2.0 license

No runtime deps