Semester: summer 2026/27
Labs: time not scheduled, room not assigned (Pavel ŠimerdaLukáš Hozda)
Page in SIS: NPRG083
Grading: Credit

About

This optional course is a follow-up to the previous course Programming in Rust and introduces more advanced Rust topics. First we revisit the topic of parallel programming introduced in the first course and we look at both threads and coroutines. Then we discuss ownership and lifetimes in more detail. After that we focus on the usage of macros and unsafe blocks and look into integration with operating system APIs and external libraries.

This course runs since 2024/25 and extends the original PRG073 course we introduced back in 2021/22 with a dedicated lab for each of the six lectures. After the course you should be ready to pursue topics like systems programming with Rust as the main language or integration of Rust with other programming languages.

Schedule

Date Content Downloads
Borrow Checker
Understanding the limits of the borrow checker. Getting familiar with its capabilities and requirements. Knowing your way around ownership, shared borrowing, exclusive borrowing. Making sure you know exactly why the compiler refuses your code and what you can do with that.
recording
Concurrency
Understanding how a coroutine library works, what it does, how it interacts with the operating system. Creating a future and a simple coroutine scheduler. Using a coroutine library with asynchronous I/O support to build a software that communicates over sockets or other non-blocking channels. Running computations in dedicated operating system threads.
Macros
Using procedural macros as an extension of the Rust compiler capabilities. Introducing function, derive and attribute macros. Processing and generating token streams. Integrating macros in the Cargo build system and building projects that use these macros. Defining simple declarative macros. Using all kinds of macros in a useful and productive way.
recording
slides
Libraries and Testing
Organizing your code into modules and crates. Providing unit tests and integration tests. Maintaining API documentation. Understanding visibility as well as module and crate boundaries. Using the `pub` keyword correctly, especially in library projects. Handling abstraction and encapsulation while staying in the world of idiomatic Rust.
recording
Unsafe Code
Creating libraries that need to interface with the operating system or with external libraries. Producing highly optimized code that cannot be expressed in Rust without escaping some of the safety restrictions. Working with uninitialized chunks of memory. Building safe interfaces on top of encapsulated unsafe code blocks and functions.
recording
slides
Systems Integration
Integrating low-level operating system interfaces and building I/O libraries on top of them. Maintaining the boundary between system calls or even bare metal hardware. Integrating assembly with Rust code. Looking closely at the build process and tweaking the build configuration. Understanding the compilation phase as well as static and dynamic linking.
recording
Discussion and more topics
Wrapping up the course and discussing solutions to home works and real-world projects. Opportuinity to discuss advanced Rust topics in a broader perspective.

For the labs, we advise you to bring your own device where you can do the labs in Rust.

Grading

Not yet decided.

Contact

We meet on Discord:

You can also contact us individually:

Community Events

Follow Rust events in Czech Republic: