Hello World

To make a hello world in rust, it’s pretty dang easy.

  1. Run cargo new hello-world, then cd hello-world.
  2. This will actually scaffold a hello world for you but here it is as well. In src/main.rs, write this:
fn main() {
    println!("Hello, world!");
}
  1. Lastly, run this: cargo run.

Boom, done. Hello world with Rust.

end of storey Last modified: