Working with Rust

Hello World

Hello World

You can initialize your first program using;

cargo init hello

This will create the following:


The stubbed source file looks like:

fn main() {
    println!("Hello, world!");

From inside the hello/ directory, run

cargo run

The Cargo.toml file is called the manifest file. It contains project settings and dependencies. For starting off, you don't need to do much with it, but you can see the manifest format documentation for additional details.