AR Async Rust Lab

24-Hour Hands-On Lab Schedule

Three-Day Production Async Rust Syllabus

Filter all eight bare-metal engineering labs by day and systems focus. Every session concludes with a live benchmark target and code review.

8 lab modules
Day 1 · Pinning LAB-1A · Day 1 · 09:00–12:30

Desugaring async/await: State Machines, Pin<P> & Structural Guarantees

Inspect MIR output of async blocks, write sound pin-projections by hand, and eliminate heap boxing in hot trait-object boundaries.

Workspace Crate
01-pin-futures
Verified Deliverable
Custom zero-alloc Future combinator verified clean under Miri
Day 1 · Pinning LAB-1B · Day 1 · 14:00–17:30

Cancellation Safety, Structured Concurrency & Drop Semantics

Audit tokio::select! branches for silent message loss and design restartable protocol parsers that survive abrupt task drops.

Workspace Crate
01-cancel-safe
Verified Deliverable
Cancel-safe framed TCP codec + JoinSet graceful shutdown harness
Day 2 · Lock-Free LAB-2A · Day 2 · 09:00–12:30

Memory Ordering, Cache-Line Padding & Lock-Free SPSC/MPSC Queues

Move beyond SeqCst guesswork: model Acquire/Release fences on x86-64 and ARM64 and catch subtle ABA bugs with Loom.

Workspace Crate
02-lockfree-ring
Verified Deliverable
Loom-proven bounded ring buffer sustaining 68M ops/sec
Day 2 · Lock-Free LAB-2B · Day 2 · 14:00–17:30

Inside Tokio's Multi-Threaded Scheduler & LIFO Slot Internals

Trace work-stealing park/unpark cycles, isolate blocking tasks onto dedicated pools, and tune cooperative task budgets.

Workspace Crate
03-tokio-scheduler
Verified Deliverable
Backpressure-controlled gateway removing 99.9th percentile queueing collapse
Day 3 · io_uring LAB-3A · Day 3 · 09:00–12:30

Completion-Based I/O: io_uring SQE/CQE & Ownership-Safe Buffer Rings

Understand why readiness-based epoll breaks down at high NVMe/NIC rates and how completion-based Rust APIs guarantee buffer safety.

Workspace Crate
04-io-uring-net
Verified Deliverable
Thread-per-core echo proxy using registered fixed buffers and SQPOLL
Day 3 · io_uring LAB-3B · Day 3 · 14:00–16:00

Shared-Nothing Thread-per-Core Architecture vs. Work-Stealing

Quantify cross-core cache bounce costs and build a pragmatic decision matrix for when to stay on Tokio versus adopt thread-per-core.

Workspace Crate
05-tpc-router
Verified Deliverable
Head-to-head benchmark comparing Tokio vs. thread-per-core io_uring
Profiling LAB-3C · Day 3 · 16:00–18:00

Production Diagnostics: tokio-console, eBPF Flamegraphs & perf stat

Capture off-CPU scheduling delays, L3 cache misses, and futex contention in live Rust services with < 1% overhead.

Workspace Crate
06-ebpf-diag
Verified Deliverable
Automated latency regression harness with hardware PMU counters
Profiling BONUS · Post-Lab Clinic

Staff Team Architecture Review (Private Workshop Add-On)

Half-day deep dive directly inside your team's production Rust services, Cargo workspace, and flamegraph captures.

Workspace Crate
team-audit
Verified Deliverable
Written runtime & lock-contention remediation blueprint