0
0
Rustprogramming~15 mins

What is Rust - Hands-On Activity

Choose your learning style9 modes available
What is Rust
๐Ÿ“– Scenario: You are curious about a programming language called Rust. You want to learn what it is and see a simple example of how to write and run a Rust program.
๐ŸŽฏ Goal: Learn what Rust is and write a simple Rust program that prints a message to the screen.
๐Ÿ“‹ What You'll Learn
Create a Rust program with a main function
Print a message explaining what Rust is
Use correct Rust syntax for printing
Understand the basic structure of a Rust program
๐Ÿ’ก Why This Matters
๐ŸŒ Real World
Rust is used to build fast and reliable software like web browsers, games, and operating systems.
๐Ÿ’ผ Career
Knowing Rust can help you work on system-level programming jobs that require safety and performance.
Progress0 / 4 steps
1
Create the main function
Write a Rust fn main() function to start your program.
Rust
Need a hint?

The main function is the entry point of a Rust program. It looks like fn main() { }.

2
Add a print statement
Inside the main function, add a println! macro to print the message "Rust is a systems programming language.".
Rust
Need a hint?

Use println!("message"); to print text in Rust.

3
Explain Rust in a comment
Add a comment above the println! line explaining that Rust is safe and fast.
Rust
Need a hint?

Comments start with // in Rust.

4
Run the program and show output
Run the Rust program and print the output it produces.
Rust
Need a hint?

The program prints the message exactly as given.