RRust By Example
beginnerBasics

Hello World

Print text to the standard output with println! macro.

Hello World

Print text to the standard output with println! macro.

Difficulty

Beginner

Code

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

Explanation

println! is a macro that prints to standard output. Every Rust program starts with a main function.

Key Concepts

  • Read the code carefully and understand the data flow
  • Try modifying the example to see how it changes behavior
  • Run this code in the Rust Playground

Related Topics

Browse more examples in the basics category to build a complete understanding of this topic.

More Basics Examples