Hello World

A rust way to say hello world!

Code in Rust

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ferris_says::say;

use std::io::{stdout, BufWriter};

fn main()
{
let stdout=stdout();
let message = String::from("Hello fellows!\nHello again.\n");
let width = message.chars().count();

let mut writer = BufWriter::new(stdout.lock());

say(message.as_bytes(),width,&mut writer).unwrap();

}

Output

1
2
3
4
5
6
7
8
9
10
 ________________
/ Hello fellows! \
\ Hello again. /
----------------
\
\
_~^~^~_
\) / o o \ (/
'_ - _'
/ '-----' \