File: uname.rs

package info (click to toggle)
rust-uname 0.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 108 kB
  • sloc: makefile: 4
file content (12 lines) | stat: -rw-r--r-- 201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
extern crate uname;

use uname::uname;

fn main() {
    let info = uname().unwrap();

    // Print the hostname
    println!("{}", info.nodename);
    // Print everything
    println!("{:?}", info);
}