460-4157/02 – Programming in Rust (PvR)

Gurantor departmentDepartment of Computer ScienceCredits4
Subject guarantorMgr. Ing. Michal Krumnikl, Ph.D.Subject version guarantorMgr. Ing. Michal Krumnikl, Ph.D.
Study levelundergraduate or graduateRequirementOptional
Year1Semesterwinter
Study languageEnglish
Year of introduction2024/2025Year of cancellation
Intended for the facultiesFEIIntended for study typesFollow-up Master
Instruction secured by
LoginNameTuitorTeacher giving lectures
BER0134 Ing. Jakub Beránek
KRU13 Mgr. Ing. Michal Krumnikl, Ph.D.
Extent of instruction for forms of study
Form of studyWay of compl.Extent
Full-time Graded credit 2+2

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

Full-time form (validity from: 2024/2025 Winter semester)
Task nameType of taskMax. number of points
(act. for subtasks)
Min. number of pointsMax. počet pokusů
Graded credit Graded credit 100  51 3
Mandatory attendence participation: Attendance is mandatory for at least 70% of the exercises.

Show history

Conditions for subject completion and attendance at the exercises within ISP: Completion of all mandatory tasks within individually agreed deadlines.

Show history

Occurrence in study plans

Academic yearProgrammeBranch/spec.Spec.ZaměřeníFormStudy language Tut. centreYearWSType of duty
2024/2025 (N0613A140035) Computer Science P English Ostrava 1 Optional study plan

Occurrence in special blocks

Block nameAcademic yearForm of studyStudy language YearWSType of blockBlock owner

Assessment of instruction

Předmět neobsahuje žádné hodnocení.