460-4157/01 – Programming in Rust (PvR)
Gurantor department | Department of Computer Science | Credits | 4 |
Subject guarantor | Mgr. Ing. Michal Krumnikl, Ph.D. | Subject version guarantor | Mgr. Ing. Michal Krumnikl, Ph.D. |
Study level | undergraduate or graduate | Requirement | Optional |
Year | 1 | Semester | winter |
| | Study language | Czech |
Year of introduction | 2024/2025 | Year of cancellation | |
Intended for the faculties | FEI | Intended for study types | Follow-up Master |
Subject aims expressed by acquired skills and competences
The aim of the course is to introduce students to the Rust programming language and its specific constructs that enable the creation of efficient and memory-safe programs. Upon completion of the course, students will be able to independently create complex applications in Rust and be able to use the most commonly used libraries from the Rust ecosystem.
Teaching methods
Lectures
Tutorials
Summary
This course introduces students to the design of robust and memory-safe programs using the Rust programming language, focusing on robust interface design, error handling, and generic, asynchronous, and multithreaded programming. Emphasis will also be placed on explaining the principles of network applications and the specifics of their implementation in the Rust language.
Compulsory literature:
[1] KLABNIK, Steve and NICHOLS, Carol. The Rust Programming Language. 2018. No Starch Press.
Recommended literature:
[1] PALMIERI, Luca. Zero To Production In Rust. 2022. Independently published.
[2] GJENGSET, Jon. Rust for Rustaceans. 2021. No Starch Press.
Way of continuous check of knowledge in the course of semester
Ongoing review of learning activities and assignments in regular seminars.
E-learning
Other requirements
Students are expected to actively solve the problems in the programming lessons. Some assignments may require careful preparation at home.
Prerequisities
Subject has no prerequisities.
Co-requisities
Subject has no co-requisities.
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
Conditions for subject completion
Occurrence in study plans
Occurrence in special blocks
Assessment of instruction
Předmět neobsahuje žádné hodnocení.