
Programming in RUST
The Ideal Language for Game and Web Apps
What you'll learn
- Install Rust tools and create your first project
- Use Cargo
- Understand data types, variables and constants
- Use arithmetic, logical and comparison operations
- Write decision-making statements
- Use loops
- Create and use functions
- Work with possibilities and text data
- Organize and store data
- Build a complete practical application in Rust
About this course
This course teaches programming in the Rust language from scratch. It starts with the course introduction, installing the tools, creating your first project and using Cargo, then comments, data types, creating variables, working with them, and constants. After that you learn arithmetic operations, comparison operations and logical operations, then decision making, loops and functions, each over several parts with exercises and code downloads. You move on to handling possibilities, organizing and storing data, and working with text data, then you apply what you learned in a complete practical application over five parts. The course suits anyone who wants to learn a modern programming language that fits games, web applications and system software, whether you are a beginner in programming or already have experience in another language. You do not need previous experience, because the course starts from installing the tools. It presents each idea with a simple explanation and then practice in code, so you follow the steps with it and try things yourself. By the end you will be able to write programs in Rust, organize your code into functions and build a practical application on your own.
Expected outcomes
- Ability to write programs in RUST efficiently and safely.
- Understanding how to handle and organize data using variables and constants.
- Creating advanced functions and programs using iterative loops.
- Implementing practical projects using advanced tools in RUST.
Learner reviews
Course content
1Installing Tools
4 lectures
- Course IntroductionIntroduces the Rust course, covering the language's origin, its speed and memory handling advantages, and the course topics from installation, Cargo, and basics to functions, enums, and a practical project.2:17
- Installing ToolsExplains installing the Rust tools, including Rustup for managing and updating versions, the Visual Studio build tools, Cargo as the package manager, and then installing Visual Studio Code as the editor.11:53
- First ProjectExplains creating a first Rust project that prints Hello World, by writing a main.rs file with a main function and println!, then compiling and running it from the terminal.13:01
- Using CargoExplains using Cargo in Rust instead of the manual approach: creating a project with new, then building, running and checking it, plus the roles of Cargo.toml, Cargo.lock and the target folder.16:30
2Basics
5 lectures
- CommentsExplains Comments in Rust, single-line and multi-line, their role in documenting code for yourself and your team, and the fact that the Compiler ignores them completely at execution.9:51
- Data TypesExplains the basic data types in Rust: Integer, Float, Char, String, and Boolean, and how to display them using println!.13:22
- Creating VariablesExplains the variable in Rust as a named place in memory that stores data, how to create it with let, call its value and print it, and that its value cannot change unless declared specially.9:16
- Working with VariablesExplains working with variables in Rust: specifying the data type explicitly, integer, float, f32, f64 and char types, naming rules, and making a variable changeable with the mut keyword.13:46
- ConstantsExplains constants in Rust with const: the required data type, that their value cannot change, how they differ from let, and redefining a variable with the same name in the same block.11:50
3Processes
3 lectures
- Arithmetic OperationsExplains Arithmetic Operators in Rust: addition, subtraction, multiplication, division, and remainder (Modulus), with a code example and the difference between division and remainder.6:17
- Comparison OperationsExplains Relational Operators in Rust such as greater than, less than, equal, and not equal, which return a Boolean value of true or false, with code examples.10:17
- Logical OperationsExplains the logical operators in Rust (and, or, not), how they combine several comparison conditions into one expression returning true or false, as groundwork for decision making.8:01
4Decision Making
4 lectures
- Decision-Making Stages (Part One)Starts decision making in Rust with the if statement, where the code block runs only when the condition is true, with examples comparing variables and using combined conditions.10:32
- Decision-Making Stages (Part Two)Explains the if else statement in Rust, where the else block runs when the if condition is false, with an example comparing two numbers and printing a different result depending on the condition.5:55
- Decision-Making Stages (Part Three)Explains else if in Rust as the third stage of decision making, adding a new condition when the first fails, with an example deciding whether one number is greater than, less than, or equal to another.7:29
- Decision-Making Stages (Part Four)Explains using the match keyword in Rust as an alternative to an if and else if chain, comparing a variable against several patterns and running the matching arm, with a default case when nothing matches.12:29
5Iterative Loops
4 lectures
- Iterative Loops (Part One)Explains loops in Rust starting with the while loop, using a mutable variable and a condition that stays true, to print a message several times instead of repeating code by hand.12:08
- Iterative Loops (Part Two)Continues loops in Rust with the for loop and Range, using break to exit the loop and continue to skip certain values, with an exercise printing even numbers.7:43
- Iterative Loops (Part Three)Explains nested loops and compares for, while and loop in Rust, how to build a loop with a counter, the infinite loop, and stopping it with an if condition and break.4:11
- Iterative Loops (Part Four)Explains the continue and break keywords inside Rust loops: continue skips the current iteration when a condition holds, while break stops the whole loop, with a for and range example.4:35
6Functions
6 lectures
- Functions (Part One)Explains defining Functions in Rust with the fn keyword, a name, parentheses, and a code block, and how to Call a function from main to run its contents, relating it to main itself.9:35
- Functions (Part Two)Explains passing data to Rust functions through Parameters inside the parentheses, specifying their types, their order, and the error when the number of parameters does not match the arguments in the call.13:59
- Functions (Part Three)Explains functions that return a value in Rust: specifying the return data type, using return, storing the result in a variable, and passing the returned value to another function.10:17
- Functions (Part Four)Explains println! in Rust and what the exclamation mark means for a macro, printing values in the different display formats, and that it is for debugging during development and removed from the final build.7:07
- ExerciseA practical FizzBuzz exercise in Rust: a for loop over a range of numbers, checking divisibility by remainder to print Fizz, Buzz and FizzBuzz, then moving the logic into a function that takes parameters.13:48
- Downloading Codes
7Advanced Tasks
8 lectures
- Dealing with ProbabilitiesExplains the Enum in Rust for defining a set of possible values for a type such as Gender, and how to handle its values with match inside a function, including uncovered cases.13:03
- ExerciseA practical Enum exercise in Rust that defines access levels Admin, Manager, User, and Guest and uses match to decide who may access a private file, with the default arm for the rest.5:01
- Data Organization (Part One)Explains the struct in Rust for grouping related data under one name, such as an employee's name, age and gender, creating instances and accessing fields with a dot, with a review of enum.11:23
- Data Organization (Part Two)Explains adding methods to a struct in Rust using impl, how to access the instance's fields inside them, and calling methods on the object and modifying a field such as age.15:43
- Data Storage (Part One)Explains the tuple in Rust for storing several values of different types in one variable, displaying it, accessing its elements by index such as .0, or destructuring it into separate variables.13:41
- Data Storage (Part Two)Explains the array in Rust and how it differs from a tuple by holding a single type, specifying its type and size, modifying elements by index, and passing it to and returning it from a function.22:02
- Dealing with Text DataExplains handling text in Rust: the difference between string literal and string object, creating an empty string, converting a literal to an object, and using methods such as replace, trim and len.14:44
- Code Upload
8Comprehensive Practical Application
6 lectures
- Practical Application (Part One)Starts the practical Guessing Game project in Rust, which uses user Input and an external library for random numbers, including creating the project with Cargo and running it.5:42
- Practical Application (Part Two)Explains reading user input in the Rust guessing game using the io library, a mutable empty String variable, and read_line to store what the user types in the terminal.9:50
- Practical Application (Part Three)Explains generating a random number in the Rust guessing game by adding the external rand crate to Cargo.toml, building it with Cargo, and using the random number generator rng.10:47
- Practical Application (Part Four)Explains comparing the user's guess with the random number in the guessing game: converting the input string to an integer with parse, handling errors with a message, and doing the comparison with if statements.7:05
- Practical Application (Part Five)Wraps up the guessing game in Rust: comparing the two numbers with the Ordering enum and match instead of if, then putting the input in a loop that repeats until the user guesses the number.7:41
- Code Upload
Instructor

Eng. Amr Abdel Fattah



