
Learn Rust as a complete course for programmers coming from other languages, covering installation, VSCode setup, memory management with no garbage collector, and modern Rust features.
Guide Windows users to install Rust using the MSVC build tools and the LLVM toolchain, covering rustc, cargo, rustfmt, the standard library, and the linting tool, with setup steps.
Learn to install rust on linux, using the built-in toolchain, with cargo, clippy, std library, docs, compiler, and formatter; restart your shell and run cargo --help.
Install Rust on macOS with brew and the rustup-init tool, using the Linux guide if needed, and accept the default settings for a stable Rust installation.
Access the course code on GitHub, clone or fork the repository, or download and extract the ZIP to a convenient location for use in VSCode.
Install Visual Studio Code, select the OS version, install the Rust Analyzer extension and Rust extension pack, trust the project, open the downloaded folder, and generate Rust config.
Learn to create a hello world project in Rust with cargo, using cargo new, cargo build, and cargo run, and understand the main function and println!.
Open the project folder in VS Code to reveal the run and debug field, and alternatively configure rust-analyzer with the cargo.toml path for auto completion.
print to the console in rust using print and println macros, format strings with braces, and route output to stdout or stderr with practical examples.
Learn the difference between mutable and immutable variables in Rust, using let and let mut, seeing compile errors when reassigning immutable x, and noting Rust's default immutability and type inference.
Explore primitive data types in Rust, including integers (i8 to i128 and u8 to u128), floating points (f32, f64), booleans, type inference, hex and binary literals, and min/max constants.
Discover how Rust constants function as immutable, globally accessible values with explicit types, evaluated at compile time to reduce runtime, using snake_case naming in uppercase.
Discover Rust shadowing: re-bind a variable with the same name in inner scopes to overwrite values without making it mutable, and compare it to traditional mutable updates.
Learn how to read console input in Rust by prompting the user, reading into a mutable string with std::io and read_line, and converting it to an integer such as i32.
Explore tuples in Rust as fixed-length containers that hold multiple types, with mutable examples, pattern destructuring, updating by index, and printing using the debug trait.
Rust arrays store fixed-length, same-type data on the stack for fast access. Learn to create, index, print, mutate, and handle out-of-bounds panics, contrasting with vectors.
Create and use slices to obtain subsets of arrays in Rust, including start and end indices with inclusive start and exclusive end, while understanding non-owning read-only views.
Rust stores dynamic UTF-8 code points on the heap, so indexing is not supported for multi-byte characters like emojis; use push, pop, and iterate with chars or char_indices.
Learn how to define functions in Rust, declare parameters with explicit types (i32), and return values using the arrow syntax. Master the semicolon rule and last-expression return.
Examine how Rust handles if and else with boolean conditions, including if expressions for initialization, optional parentheses, and differences from other languages, plus shadowing and mutability notes.
Explore Rust loops, including for, while, and the loop construct, with range syntax and type inference. Learn to break nested loops and return values from a loop.
Define a permission level enum with standard user, instructor, and Udemy admin, derive debug for printing, and implement a description method to illustrate enum methods in Rust.
Explore how to implement enum-based logic in Rust using the match keyword, distinguishing between user and admin cases, ensuring exhaustiveness, and comparing match with switch.
Learn to use match statements to branch logic for integers and booleans, create exhaustive patterns with underscores, combine cases with or, and store results for enums and user-defined types.
Explore how Rust enums can store any type, using login data examples like none, invalid, not registered, and a username, with match statements.
Explore the Rust option enum, a generic type that represents some value or none, and learn to handle it with match when adding option u32 values.
Compare using match and the if let feature to check an admin permission in a permission level enum; implement is_admin to return true for admin and false otherwise.
Explore how to combine two option values in Rust with a nested match or an if let approach, handling some and none to sum when possible or return zero.
Master the Rust while let feature with range and array examples, using next to yield Some values, with mutable ranges and iter-converted arrays, stopping at None.
Explore string slices, a reference to existing data in Rust, including heap strings and string literals, with slice rules like array slices.
Define a user struct with is_admin, username, and password fields. Derive debug for printing, note that structs are like classes in other languages, and use dot notation for field access.
Define a circle struct with a float radius, implement methods for area and circumference using self and pi, compare circles with a smaller function, and explore borrowing references vs copying.
Learn how associated functions defined in an impl block are not methods because they take no self, and act like constructors such as user::build_admin and string::from, with multiple impl blocks.
Master struct update syntax to create new users from existing ones and learn about partial moves, plus tuple structs for rgb and coordinate values.
Explore closures in Rust by defining a local closure (lambda) that takes an i32 and returns an i32, multiplies input by two, and demonstrates local scope versus a regular function.
Learn how function pointers let you pass any function or closure with one i32 input and i32 output to other functions, using type-only parameter constraints to drive iterators and concurrency.
Demonstrates building a console guessing game by reading input, trimming, and parsing to u32, then using match to handle results and compare to a predefined 0–10 number.
Build a rust guessing game using a loop that repeats until a random number (1–10) is guessed, breaking on success, with rand and colored crates for hints and colored feedback.
Learn to cast between data types in Rust with as, converting float to integers, which truncates decimals and may overflow (265 to 255 for u8) with no implicit casts.
Explore Rust memory management by learning ownership, moves, and borrowing, and see how values can be moved or borrowed via references in functions.
Explore the borrowing rules in Rust, distinguishing immutable (shared) references from mutable (unique) references, and learn how scope affects borrow checker behavior to prevent simultaneous borrows.
Explain copy by default for primitive types and moves for other types in rust, and show how tuple destructuring can partially move a non-copy circle, needing clone or trait-based copying.
Explore borrowing in Rust by contrasting immutable references with mutable ones, noting read access vs write access and how borrows end to allow original variables to be reused.
Explore rust's RAII with smart pointers by using box to allocate heap memory and its drop method to deallocate on scope exit; learn ownership transfer via moves and automatic destruction.
The Rc pointer enables multiple ownership by tracking a reference count of owners sharing heap memory. Cloning increases the count, and memory frees when the count reaches zero.
Learn how lifetimes tell the Rust compiler how long a reference stays valid, use generic lifetime annotations to relate references, and prevent dangling pointers with return value lifetimes.
Learn how Rust panics work, using the panic macro to abort the program on unrecoverable errors, see stack unwinding and backtraces, and differentiate panic from recoverable error handling.
Explore the result enum, handling ok and error states with generics, open and read files using std::fs, and use match to manage file not found and other errors.
Explore when to use option versus result types, and replace match statements with unwrap, unwrap_or, and expect, handling some, none, ok, and error cases with panics or defaults.
Propagate errors in Rust by implementing a library function that opens and reads a file, maps the read_to_string result, and returns either the content or the original io::error.
Learn to use the question mark operator to simplify error handling in functions returning results. Replace verbose matches with early returns and chain file open and read toString.
Implement a Rust command line argument parser by collecting argv into a vec, parsing four arguments (pattern, replace, input, output), and defining an arguments struct with lifetime annotations.
Continue building a search and replace tool by reading file content and applying a regex-based replacement. Implement read and write functions, manage errors, and integrate regex usage with cargo.toml imports.
Modify the read function to use the fs read with built-in error handling, implement a write function, and use a regex to replace matches with uppercase, then build with cargo.
Define a generic data<T> struct to store any type and implement universal methods, then show how to add type-specific methods for particular types.
Explore generic functions with trait bounds in Rust, using the partial ordering trait to compare elements across types, enabling a single largest function for i32, characters, and other types.
Bound a generic struct in Rust by using a where clause to require std::fmt::Display for type T, enabling printing of self.value, and combine multiple traits with + for broader bounds.
Define a custom summary trait and implement it for Facebook post and Instagram post, using author and content or description, and illustrate default versus unimplemented methods with trait bounds.
Explore how Rust derives traits for structs, including display, debug, and hashing, and learn when copy, clone, and default can be derived based on primitive types and struct fields.
Course description:
You want to learn and master the modern and effective programming language Rust? you already have basic experience in another programming language (e.g. C/C++, C#, Java, Python etc.)? then my Rust course is just right for you!
What is Rust?
Rust was developed with the aim of being secure, concurrent and practical. Safety refers in particular to the avoidance of program errors that lead to memory access errors or buffer overflows and thus possibly also to security vulnerabilities. In contrast to other programming languages with automatic memory management, Rust does not use garbage collection for this purpose, but a special type system. Its type safety has been formally proven. (Source: Wikipedia)
Key features
No race conditions
No exceptions
No memory leaks
Official tools that are included:
Build System
Package Manager
Compiler
Unit Testing
Benchmarking
Documentation Generator
Is Rust even important to learn?
Rust has taken first place in the annual Stack Overflow survey of developers for six years in a row. The language is just as performant as C++, but at the same time more bug-proof and all the tools a developer needs are included. Even parts of the Linux kernel are already written in Rust!
This course consists of the following topics:
Installing the tools
Variables and console
Basics of features
Memory management
Generic programming
Data structures
Libraries and tooling
Threads and channels
Object orientation
Further topics
Small programming projects after the chapters
Become a professional today, in the technology of tomorrow!
See you on the course!