Lesson 01

Getting Started with Rust

Understand what Rust is, why developers use it, and how to prepare your learning environment.

Learning objectives

Why Learn Rust?

Rust is designed for building reliable and efficient software. It is popular for command-line tools, backend services, embedded systems, blockchain projects, game engines, and performance-sensitive applications. Its biggest advantage is that it helps developers catch many memory and safety problems at compile time.

The Rust Mindset

Rust rewards careful thinking. Instead of allowing many risky operations to happen at runtime, the compiler guides you while you write the program. At first, the rules may feel strict, but they help you build stronger habits and more reliable applications.

Your First Program

A Rust program usually starts with a main function. The main function is the entry point of a standard executable program.

Example code

fn main() {
    println!("Hello, Rust!");
}
Practice task: Create a file named main.rs and write a program that prints your name and the phrase “I am learning Rust”.