println!(r#”### Our new Rust course, designed for beginners, covers ###”#);
println!(r#”### % fundamental to advanced topics % ###”#);
println!(r#”### to build a strong foundation. ###”#);
Update #7 and #8
Modules, Re-export, Encapsulation
Raw and Smart pointers
Boxing DST
Update #5 and #6
Iterators: Trait ‘Iterator’, Trait ‘IntoIterator’,
Creating custom iterator
Implementing Trait ‘IntoIterator’ on a custom type
Update #4
Traits: trait objects, virtual table, boxing DST, memory layout
Closures: as struct member fields, memory layout
Update #3
Closures: introduction, syntax
Closures capturing environment, traits associated with closures(Fn, FnMut, FnOnce)
Passing closures as function arguments
Update #2
Traits: introduction, methods
Associated types of a trait
Implementing custom Display trait
Trait bounds
Update #1
Generics: syntax, functions, structs, enums
Lifetimes: scope, annotations, elision rules
Lifetime annotations: structs, methods
Const. and static variables
Do you want to learn a new programming language?
How about the Rust Programming Language?
Rust is becoming increasingly popular in system-level programming due to its memory safety and performance. It stands as a strong competitor to C++ and is perfect for those looking to elevate their system-level programming skills. Whether you are a beginner or an experienced programmer, Rust offers a modern and powerful toolset for your development needs.
Learning Rust opens doors to high-performance, safe, and reliable system-level programming
Why Rust is making waves in the tech world
Here’s the latest buzz about Rust from the industry:
Rust developers at Google are twice as productive as C++ teams
Source: The Register
Google’s shift to Rust programming cuts Android memory vulnerabilities by 68%
Source: Google Security Blog
Microsoft is busy rewriting core Windows code in memory-safe Rust
Source: The Register
Rust is proving to be a game changer in system level programming, with leading companies adopting it for its unmatched memory safety, performance, and productivity benefits.
2023 Stack Overflow Developer Survey findings indicate that,
“Rust is the most admired language, more than 80% of developers that use it want to use it again next year.”
“More respondents want to continue using Cargo(Rust’s official package manager) next year than the top competitors.”
Can Rust be the future of embedded systems development?
This course provides a strong foundation in Rust programming, which can be valuable for embedded software developers transitioning from C
Why should you consider learning Rust?
There are many answers, but here are the important ones.
* Memory safety without garbage collection
* Better concurrency without data races
* Safe and unsafe code
* Performance friendly abstractions
* Rust is designed to be as fast as C and C++
* Awesome Tools and Ecosystem (Cargo (the package manager and build system), rustfmt (code formatting), clippy (linting), and a comprehensive standard library.)
* Built-in testing support
* Support for key Object-oriented programming principles
Why should you consider our course?
Our course is designed with beginners in mind. We use text, images, graphics, and animations to concisely demonstrate many intriguing concepts of Rust. This will build a solid foundation for you to understand the key concepts of the language. Also, we cover numerous small to large code snippets to demonstrate the concepts, allowing you to build complex programs.
Important Topics covered so far in the course
1. Variables and primitive data types
2. Ownership and Borrow
3. Copy and Move semantics
4. Tuples and Pattern matching
5. Decision-making and Loops
6. Structs and Pattern matching
7. Enums and Pattern matching
8. Struct/Enum Methods and associated functions
9. Slices
10. String, String slice and UTF encoding
11. Lifetimes
12. Traits
13. Generics
14. Closures
15. Iterators
16. Smart pointers
17. More topics to come(multi-thread ,macros, etc ).
We constantly update this course to ensure you have the latest knowledge and skills
Hardware/Software Requirements
1. Windows/MAC/Ubuntu machine with Microsoft VS Code IDE installed
Note:
This course focuses on general Rust programming and does not specifically discuss no_std scenarios commonly used for embedded systems.
Named placeholders in format!() or println!() improve clarity by specifying which variables to use in different parts of the string. This is particularly useful when using multiple variables or repeating them.
This video discusses 3 important cargo tools
1) cargo fmt: Formats your Rust code according to style guidelines, ensuring consistency across your codebase
2) cargo clippy : Does static analysis of your code (linter)
3) cargo fix : Fixes warnings produced by rust compiler
In this video, we will learn how to use the 'let' statement to create immutable and mutable variables, as well as explore the various primitive data types offered by Rust.
Rust does not perform implicit casting or automatic type promotions like C or C++. In Rust, all type conversions must be explicit to prevent unexpected behavior and bugs that can arise from implicit type conversions.
'as' keyword allows you to explicitly cast between different numeric types, like from an integer to a floating-point number or vice versa. This ensures that you are aware of any potential data loss or truncation that could occur during the conversion.
This video also discusses a byte literal and a char literal.
char type in Rust is 4 bytes in size and represents a Unicode scalar value. This design allows it to cover a wide range of characters from many different languages, as well as emojis and other symbols.
Each char in Rust is a Unicode character that falls within the Unicode code point range from U+0000 to U+D7FF and U+E000 to U+10FFFF, covering most of the Unicode standard.
https://en.wikipedia.org/wiki/List_of_Unicode_characters
In this lecture, you will learn about Arrays. Arrays are a fixed-size, contiguous collection of elements of the same type.
In this video, we'll learn the concepts of Borrow(mutable and immutable) , Borrower and Referent.
In Rust, you cannot have a mutable borrow and an immutable borrow of the same variable at the same time. This is to ensure that the variable's state is not changed unexpectedly. Once a variable is borrowed mutably, any subsequent attempts to borrow it immutably will cause a compile-time error, and vice versa.
In this video, we'll learn about the Slice data type. Slice is one of the primary data types in rust for handling sequences of data without taking ownership of them.
This video discusses the usage of a few methods of the slice data type. For the full list please check this doc page
https://doc.rust-lang.org/std/primitive.slice.html
In this video, we will explore decision-making statements in Rust, such as if and else statements. In Rust, decision-making statements can also be used as expressions.
In languages like C/C++, if...else is a statement that doesn't return a value. However, in rust, if...else can also be used as an expression, meaning it can return a value based on the condition evaluated. This helps to handle conditional logic efficiently while coding.
In this video, We'll learn about using the 'match' statement in Rust.
'match' statement in Rust is a powerful pattern matching tool. It allows you to comparee a value against a series of patterns and execute code based on which pattern matches.
A website requires the users to input username and password to register. Write a program to check the validity of password input by users.
Following are the criteria for checking the password:
1. At least 1 letter between [a-z]
2. At least 1 number between [0-9]
1. At least 1 letter between [A-Z]
3. At least 1 character from [$#@]
4. Minimum length of transaction password: 6
5. Maximum length of transaction password: 12
Expected output
###### Set New Password ######
1. At least 1 letter between [a-z]
2. At least 1 number between [0-9]
3. At least 1 letter between [A-Z]
4. At least 1 character from [$#@]
5. Minimum length of transaction password: 6
6. Maximum length of transaction password: 12
Enter New Password: <User enters the password>
Re-enter New Password: <User re-enters the same password>
Password is Weak/Strong/Do not match
Password change successful/unsuccessful