- Trainer: Kamal Kumar Mukiri (@acl)
- Time: 8:00 PM to 9:30 PM (IST)
- Dates: November 11, 2024, to December 12, 2024
- Schedule: Monday to Thursday (20 sessions)
- Location: Online (Google Meet)
Welcome to the Rust Programming Essentials course! This course is designed to provide a comprehensive foundation in Rust programming, covering everything from basic syntax to advanced topics like error handling, memory safety, and concurrency.
Rust Programming Essentials is a hands-on course that will guide you through the fundamental concepts of Rust. By the end of this course, you'll have a strong foundation in Rust programming and be able to build applications that leverage Rust's performance and safety benefits.
- Understand Rust’s core features and unique design philosophy.
- Learn about ownership, borrowing, and lifetimes for safe memory management.
- Master Rust's error handling mechanisms.
- Explore advanced topics like concurrency, async programming, and traits.
- Basic knowledge of programming concepts.
- Familiarity with a language like C/C++ or Python is recommended but not required.
- Access to a computer with Rust installed (instructions provided in Module 1).
This course is ideal for:
- Developers who want to learn Rust from scratch.
- Programmers interested in systems programming and safe memory management.
- Anyone interested in understanding how Rust prevents common programming errors.
- Topics: Installing Rust, basic syntax,
cargo
package manager, Hello World program. - Outcome: Set up a Rust development environment, navigate
cargo
, and understand Rust’s core syntax. - Testing: Unit and integration tests, test organization, assertions, and
#[test]
attributes. - Coverage: Code coverage with
cargo-tarpaulin
and other tools for tracking tested code. - Linting and Formatting: Using
rustfmt
,clippy
, andcargo-audit
for linting and code quality.
- Topics: Primitive types, mutability, constants, shadowing, type inference, basic arithmetic, and string manipulation.
- Outcome: Work with Rust's data types, understand mutability, and manipulate data.
- Topics: Ownership rules, borrowing, references, slice types, lifetimes, and the borrow checker.
- Outcome: Grasp Rust's memory model to avoid memory issues and optimize data management.
- Topics:
if
statements, loops (for
,while
,loop
),match
expressions, destructuring, andif let
/while let
patterns. - Outcome: Implement complex control flows and leverage Rust’s pattern-matching capabilities for clean code.
- Topics: Function definitions, closures, capturing environment variables, error handling with
Result
andOption
, and early returns. - Outcome: Write reusable functions, work with closures, and handle errors effectively.
- Topics: Structs, tuple structs, enums, pattern matching with structs and enums, option types, and Result-based pattern matching.
- Outcome: Model complex data structures and perform advanced pattern matching for cleaner code.
- Topics: Vectors, hash maps, strings, iterators, combinators (
map
,filter
,fold
,collect
), and ownership within collections. - Outcome: Manipulate data in collections efficiently and apply functional programming concepts in Rust.
- Topics: Traits, generic types, lifetimes with generics,
Box
,Rc
,Arc
, andRefCell
. - Outcome: Create reusable, flexible code using generics and smart pointers, enabling ownership of complex data structures.
- Topics: Threads,
std::sync
(Mutex, Channels),async
/await
, async functions, futures, and asynchronous error handling. - Outcome: Write concurrent and asynchronous code in Rust for high-performance applications.
- Topics:
unsafe
Rust, raw pointers, macros, procedural macros, low-level programming. - Outcome: Explore advanced Rust features and gain understanding of low-level programming concepts.
- Topics:
- Cargo Tools: Using
cargo
subcommands, workspace management, dependency management, and release profiles. - Miri: Running Miri to detect undefined behavior and perform safe checks.
- Benchmarking and Profiling: Performance analysis using
cargo bench
and other profiling tools.
- Cargo Tools: Using
- Outcome: Master Cargo’s powerful features, write thorough tests, analyze code coverage, and use tools like Miri for secure code, making projects robust and production-ready.
This course outline takes learners through foundational to advanced Rust programming topics and tools, preparing them for building high-quality, robust applications.
- Description: A command-line to-do list manager to add, edit, delete, and view tasks.
- Modules:
std::fs
,std::io
- Key Features: Data storage in text or JSON files, user-friendly CLI.
- Description: A CLI app to convert temperatures between Fahrenheit, Celsius, and Kelvin.
- Modules:
std::io
- Key Features: Data input/output, temperature formula calculations.
- Description: Extract specific information from a webpage.
- Modules:
reqwest
,scraper
- Key Features: Fetch HTML, parse elements using CSS selectors.
- Description: Converts Markdown text to HTML format.
- Modules:
regex
,pulldown-cmark
- Key Features: Support for headers, lists, and inline formatting.
- Description: CLI app to convert units of length, weight, and volume.
- Modules:
std::io
- Key Features: Enums for unit types, conversion formulas.
- Description: A CLI calculator for basic math operations.
- Modules:
std::io
- Key Features: Parsing input, handling arithmetic errors.
- Description: A number guessing game that gives hints to the user.
- Modules:
rand
,std::io
- Key Features: Random number generation, user interaction.
- Description: A CLI app that fetches weather data for a specified location.
- Modules:
reqwest
,serde_json
- Key Features: API integration, JSON parsing, CLI.
- Description: Sorts files into folders by type or date.
- Modules:
std::fs
,chrono
- Key Features: File type recognition, date-based sorting.
- Description: A TCP-based chat app where clients can communicate.
- Modules:
std::net
,tokio
- Key Features: TCP sockets, async message handling.
- Description: A REST API server for a to-do list or notes app.
- Modules:
actix-web
,serde
,serde_json
- Key Features: CRUD operations, JSON serialization.
- Description: Tool to resize, crop, or grayscale images.
- Modules:
image
- Key Features: Image processing, command-line options.
- Description: Shortens URLs and stores them in a database.
- Modules:
actix-web
,serde
,sqlite
- Key Features: API for URL shortening, database interaction.
- Description: A game where players navigate rooms, collect items, and solve puzzles.
- Modules:
std::io
- Key Features: Structs and enums for game elements, CLI interaction.
- Description: CLI tool for storing and retrieving encrypted passwords.
- Modules:
std::fs
,ring
,rpassword
- Key Features: Encryption, password hashing, secure file storage.
- Description: Indexes text files and allows keyword-based searches.
- Modules:
std::fs
,regex
,rayon
- Key Features: Parallel file processing, regex for text matching.
- Description: Basic blockchain with block validation.
- Modules:
ring
,serde
,chrono
- Key Features: Cryptographic hashing, chain validation.
- Description: Compiler with lexer, parser, and basic evaluation.
- Modules:
logos
,nom
- Key Features: Tokenization, syntax parsing, code generation.
- Description: Syncs files across folders or devices.
- Modules:
std::fs
,chrono
- Key Features: File comparison, sync algorithms.
- Description: Job scheduler that runs multiple tasks concurrently.
- Modules:
tokio
,std::sync
- Key Features: Task scheduling, async execution.
- Clone the Repository:
git clone https://github.com/your-username/rust-programming-essentials.git cd rust-programming-essentials