notes/sandbox/hello.rs
2023-04-22 00:41:54 -07:00

20 lines
442 B
Rust

// this is a comment, and is ignored by the compiler
//
// this is the main fucntion
/* this is a
* multiline comment*/
fn main() {
// statements here are executed when the compiled binary is called
//
// print text to the console
println!("Hello World!");
}
// to compile simply enter into terminal:
// rustc hello.rs
// this will create a binary under the same name, simply run:
// ./hello
//
// OUTPUTS:
// Hello World!