YouTip LogoYouTip

Rust Tutorial - Getting Started

Hello World

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

Variables

let x = 5;          // immutable
let mut y = 10;     // mutable
y = 15;

let name: &str = "Alice";

Summary

  • Rust is memory-safe without garbage collection
  • Variables are immutable by default
← Rust Ownership and BorrowingGo Goroutines and Channels β†’