Welcome to your Rust journey! Today we'll write our first Rust program and learn the fundamentals.
Rust is a systems programming language focused on safety, speed, and concurrency. It's the language of choice for Solana programs!
letprintln! macro for output{}Create a variable called name with the value "Rustacean" and print a greeting message.
In Rust, variables are declared with let:
let x = 5; // immutable by default
let mut y = 10; // mutable with 'mut'Use println! to print to the console:
let name = "World";
println!("Hello, {}!", name); // Output: Hello, World!name with the value "Rustacean"Hello, Rustacean! Welcome to Rust.Make sure your output matches exactly - including punctuation and spacing!
let to declare the variableprintln! with {} for interpolation&str literal (in quotes)