Skip to content

Going deeper

Level: reference

One line: The domain shelves — unsafe, embedded, async, macros, testing, performance — each of which is a subject rather than a chapter, and none of which you need until you need it.

All links checked 2026-08-23. The organising rule: these are for when you have a specific problem. Reading the async book before you have written a program that waits for something is a way of learning vocabulary rather than skills.

unsafe and FFI

  • The Rustonomicon ↗ — the official book on unsafe Rust, and it opens by telling you not to read it. Correct: it documents the rules you must uphold when the compiler stops checking, and those rules only make sense once you know what is being relaxed.
  • An unsafe mental model ↗ — a shorter, more recent attempt at the model rather than the rules. A good first read before the Nomicon.
  • The Nomicon's FFI chapter ↗ — calling C, and being called by it. (The widely-linked Michael Bryan FFI guide is dead as of 2026-08-23; this covers the same ground and is maintained.)
  • bindgen ↗ — generates Rust bindings from C headers, so you do not transcribe a struct by hand and get the padding wrong.

The reason this section is first: unsafe is the one place where a mistake is not a compile error, so it is the one place where reading before writing genuinely pays.

Embedded

  • The Embedded Rust Book ↗ — the canonical starting point: no_std, cross-compilation, peripherals, interrupts.
  • Pico with Rust ↗ — a project-driven book on the Raspberry Pi Pico, which is the cheapest way to have real hardware in front of you.
  • Nanosat workshop ↗ — AeroRust's satellite workshop, for when the Pico gets boring.

Async

Worth one warning: async Rust is a distinct dialect with its own difficulties (pinning, Send bounds across await points, lifetimes in futures), and almost none of them are the difficulties of ordinary Rust. Learn ordinary Rust first, and reach for async when you have a program that is genuinely waiting on I/O rather than because it sounds modern.

Macros

  • proc-macro-workshop ↗ — David Tolnay's exercises, and effectively the standard curriculum. Five projects, each building a real derive macro. Hard, and the fastest route to actually understanding them.

Testing

See also this library's cargo-nextest page for the runner, which is a different question from what to test.

Performance and benchmarking

Networking and interop

  • Quinn's networking introduction ↗ — QUIC in Rust, and an unusually good explanation of the protocol regardless of language.
  • Rust–Python interop ↗ — PyO3 and maturin: writing a Python extension in Rust. The most likely first professional use of Rust for someone whose day job is Python.
  • Telemetry ↗ — logging, tracing and metrics, which is the part nobody teaches and everybody needs by week three of running something.

Video

  • Jon Gjengset ↗ — long-form, live-coded, and the deepest free Rust teaching that exists. Not for beginners; extraordinary once you can read Rust.
  • Decrusted ↗ — his series reading the source of crates you already depend on, which is a rare and useful thing to watch someone do.
  • No Boilerplate ↗ — fast, opinionated, well-argued. Several pages in this library's toolchain section exist because of one of its videos, including where they disagree with it.

See also

Po polsku

To jest półka „na później”, i to nie w znaczeniu „trudniejsze”, tylko dziedzinowe: każdy dział tutaj jest osobnym tematem, a nie kolejnym rozdziałem kursu. Reguła porządkująca całą stronę brzmi: sięgasz po nie, kiedy masz konkretny problem, a nie w kolejności spisu treści. Przeczytanie książki o async, zanim napisało się program, który faktycznie na coś czeka, daje słownictwo, a nie umiejętność — różnica jest niewidoczna dla samego czytającego i doskonale widoczna dla kompilatora przy pierwszej próbie napisania czegokolwiek.

Jeden wyjątek od reguły „najpierw pisz”, i dlatego stoi na tej stronie pierwszy: unsafe. To jedyne miejsce w Ruscie, w którym pomyłka nie jest błędem kompilacji, tylko błędem w programie, który się zbudował i działa — więc tu czytanie przed pisaniem naprawdę się opłaca. Warto przy okazji rozbroić odruch tłumaczeniowy: unsafe nie znaczy „niebezpieczny kod”. To deklaracja odpowiedzialności — „biorę na siebie niezmienniki, których kompilator w tym miejscu już nie sprawdza”. Blok unsafe niczego nie wyłącza i nie osłabia; przenosi obowiązek dowodu z kompilatora na autora. Samego słowa nie tłumacz nawet w myślach, bo w kodzie, w komunikatach i w każdym wyniku wyszukiwania i tak stoi unsafe.

Podobne ostrzeżenie dotyczy async: to osobny dialekt języka, z własnymi trudnościami (Pin, ograniczenia Send w poprzek punktów await, czasy życia wewnątrz Future), z których prawie żadna nie jest trudnością zwykłego Rusta. Naucz się najpierw zwykłego. Na koniec praktyczna uwaga o tym, jak Rust wchodzi do pracy: najczęściej nie przez „projekt w Ruscie”, tylko przez jeden moduł — rozszerzenie do istniejącego programu w Pythonie napisane w PyO3. To decyzja o jednym module, a nie o języku całego zespołu, więc bywa jedyną, którą da się przeforsować.

Szukaj po polsku: niebezpieczny Rust · programowanie asynchroniczne · rustonomicon · rust async await tokio · pyo3 python rust