Rust by Example: Hello, world!

Let's create our first Rust program, the famous "Hello, world!". Place the following code in a file called hello-world.rs:

Run code Copy code
fn main() {
    println!("Hello, world!");
}

To run the program

$ rustc hello-world.rs
$ ./hello-world
Hello, world!
Go to Index | Next: Variables