Skip to main content
Skip header

Programming in Rust

Type of study Follow-up Master
Language of instruction English
Code 460-4157/02
Abbreviation PvR
Course title Programming in Rust
Credits 4
Coordinating department Department of Computer Science
Course coordinator Mgr. Ing. Michal Krumnikl, Ph.D.

Subject syllabus

Lectures
- Rust project management (Cargo), variables, type system, expressions
- Functions, data structures (structures and enums), pattern matching, modules
- Concepts of ownership, borrowing and lifetimes
- Standard library basics (strings, dynamic arrays, hash tables), error handling, interior mutability
- Polymorphism, concept of traits, generic programming, dynamic dispatch
- Functional programming (iterators, anonymous functions)
- Use of libraries (serialization, error handling, logging, command line parameters, etc.)
- Working with sockets and network programming
- Threads, reference counting, synchronization primitives, parallelism
- Non-blocking operations, Pin and Future concepts, asynchronous programming
- Creating macros, the concept of unsafe
- Using code written in other programming languages (foreign function interface)

Exercise
- Working with the Cargo tool, IDE settings, variables, data types, expressions
- Structures and enums, pattern matching, dividing a program into modules
- Creating an API using the concept of ownership, introduction to the concept of borrow checker
- Use of standard library, error handling and extreme situations
- Creating a polymorphic API using traits and generic programming
- Using functional programming using iterators and anonymous functions
- Using external libraries from crates.io
- Creating a network application using blocking sockets
- Using threads and synchronization primitives
- Creating a network application using non-blocking sockets, working with Futures and async/await
- Declarative and procedural macros, using the unsafe block, introduction to the miri tool
- Using C or C++ code, implementing Python modules using Rust

Literature

[1] KLABNIK, Steve and NICHOLS, Carol. The Rust Programming Language. 2018. No Starch Press.

Advised literature

[1] PALMIERI, Luca. Zero To Production In Rust. 2022. Independently published.
[2] GJENGSET, Jon. Rust for Rustaceans. 2021. No Starch Press.