-
Rebola Pardo, Adrian authoredRebola Pardo, Adrian authored
Rust Tutorial
This repository contains the material used as part of the Forsyte & Friends Rust tutorial. Its main purpose was to provide the audience with enough information about Rust for them to be able to decide on whether they would want to learn and use the language in the future.
Structure
-
Design Principles: Contains slides describing the general design principles of the Rust language and how it relates to other languages.
-
Ecosystem: Contains slides describing the Rust ecosystem, including how the language is developed, which tools are available and who uses Rust today.
-
Pros/Cons: Contains slides listing several reasons for and against Rust that one should be aware of.
-
Unsafe: Contains slides introducing unsafe Rust and myths around it. This part is accompanied by the code in the other directories:
- "Pointer dereference": Contains an example of the kinds of behavior unsafe Rust allows without incurring undefined behavior.
- "No unsafe, no bugs": Contains an example of a safe Rust program that nevertheless contains a data race-based bug.
-
"Safe means safe": Contains an example of a safe Rust program with
#[forbid(unsafe_code)]
that nevertheless contains unsafe code under the hood. - "Unsafe Rust is C++": Contains an example of an unsafe program that is correct under C++ semantics but results in undefined behavior in Rust.
- "Enforcing invariants": Contains an example on how to power-use the safe-unsafe boundary to guarantee that methods can only be safely applied; this example is a very simplified version of two-watched literal lists in SAT solving.