hostname 0.4.2

Cross-platform system's host name functions
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Naive re-implementation of the Linux `hostname` program.

use std::io;

fn main() -> io::Result<()> {
    let name = hostname::get()?;

    println!("{}", name.to_string_lossy());

    Ok(())
}