TUSST — the Stroop SigilTUSST
journeyforgecampaignadvanced
sign in
‹ advanced path

Macros, Unsafe, FFI & Money

The four edges a systems reviewer is expected to hold: what a derive expands to, what an unsafe block promises, what crossing into C++ costs, and why a float must never hold a balance.

serves: Rust/C++ systems programming7 lessons · ~4h
progress0/7
Start track

// lessons

  1. 01

    Modules, Visibility & Crate Layout

    Use mod, pub and pub(crate) to make an invariant unbreakable from outside.

  2. 02

    macro_rules! & Declarative Macros

    Write a macro that a function could not have replaced.

  3. 03

    Derive & Procedural Macros

    Say what #[derive(Debug, Clone)] actually generates, and where Serde fits.

  4. 04

    unsafe: The Contract

    State the invariant an unsafe block assumes — the skill a reviewer is paid for.

  5. 05

    Raw Pointers & Aliasing

    Handle *const/*mut T and name the guarantee you just gave up.

  6. 06

    FFI, extern "C" & the ABI Boundary

    Pass ownership across a C boundary without leaking or double-freeing it.

  7. 07

    Integer Money & Checked Arithmetic

    Handle a balance in fixed-point integers, and pick between checked, saturating and wrapping deliberately.

Every exercise compiles and runs in the Forge sandbox — standard library only, no external crates.

TUSST · The Ultimate Stellar Supreme Tutorial

learn rust → master stellar · open-source