Hostname: Difference between revisions

Added Rust
(Added Rust)
Line 839:
print UserInfo$ ' Information about the user's web browser
print UserAddress$ ' IP address of the user</lang>
 
=={{header|Rust}}==
Works on windows and linux with crate <code>hostname</code> version 0.1.5
<lang Rust>fn main() {
match hostname::get_hostname() {
Some(host) => println!("hostname: {}", host),
None => eprintln!("Could not get hostname!"),
}
}</lang>
 
=={{header|Scala}}==
Anonymous user