Programming in Rust 1000-2M24RUS
Issues
* Introduction. Rust language ecosystem. Rustup, Cargo, Clippy, Rustfmt. “Hello world”.
* Ownership. Borrow checker - the central innovation in Rust. String vs &str, Vec
* Data types. Structs and enums. Pattern matching.
* Crates and modules. Handling dependencies. Cargo.toml.
* Explicit error handling. Result type instead of exceptions, Option type instead of null.
* Generic types. Trait. Static (impl) vs dynamic (dyn) dispatch.
* Built-in tool for code testing.
* Functional programming. Iterators and closures.
* Ownership part 2. Smart pointers. Analogies and differences compared with C++.
* Introduction to concurrency in Rust. “Fearless Concurrency”. Threads. Rayon library. Parallel iterators.
* Asynchronous programming in Rust. Tokio library.
* Higienic macros. Declarative macros, procedural macros.
* Unsafe code. Guarantees given by the safe code. Responsibility of an API designer in Rust.
* Binary compatibility with C language (FFI - Foreign Function Interface) - extern "C", repr(C).
* Overview of popular libraries: log - logging (diagnostic messages), clap - command line arguments parsing, iced/egui - buiding GUI, serde - data serialization and deserialization, {anyhow, thiserror} - error handling in applications and libraries, correspondingly; axum - convenient web framework.
Main fields of studies for MISMaP
Prerequisites
Object-oriented programming
Concurrent programming
Introductory programming
Course coordinators
Assessment criteria
Grading fully based on programming projects.
Two grading parts:
1) small assignments after each lab, practising issues introduced during the lab,
2) a bigger project (done in two iterations), with its topic and scope to be agreed on with the teacher.
Bibliography
The Rust Book - https://doc.rust-lang.org/book/
Additional information
Additional information (registration calendar, class conductors, localization and schedules of classes), might be available in the USOSweb system: