Rust Hello World

Updated: 09 April 2024

Enter the following in file hello.rs

fn main() {
    println!("Hello World!");
}

Create a binary with rustc, the Rust compiler

rustc hello.rs

Run the binary

./hello
Hello World!