Course
Rust for Production Services
Rust the way real services need it: ownership and lifetimes without fear, trait-driven design, thiserror/anyhow, async with Tokio, workspaces, and auditing unsafe.
Ownership, Lifetimes, and Trait-Driven Design
The type-system fundamentals that make service code correct: ownership, borrowing, lifetimes, and trait-based seams.
- 01Ownership and Borrowing in Service CodeMove semantics, &T vs &mut T, own at the boundaries borrow in the middle, and when Arc actually earns its keep.20mOpen
- 02Lifetimes in Real InterfacesElision rules, zero-copy views, why tokio::spawn rejects your reference, and Cow for maybe-borrowed returns.20mOpen
- 03Trait-Driven Design: Ports and AdaptersNarrow traits at real boundaries, generics vs dyn, the async-fn-in-trait trap, and extension traits that earn their keep.25mMembers
Errors and Async at the Service Boundary
Typed errors with thiserror, propagation with anyhow, and async Rust that survives production: timeouts, backpressure, shutdown.
- 01Error Handling with thiserror and anyhowTyped domain errors at library boundaries, context chains at the application layer, and not leaking internals to clients.25mMembers
- 02Async Rust: Tasks, Futures, and CancellationFutures are inert, select! cancellation safety, the blocking wall, and why a std Mutex guard across .await is the bug that ships.30mMembers
- 03Timeouts, Backpressure, and Graceful ShutdownDeadlines on every external call, bounded channels that push back on producers, and CancellationToken-driven draining.25mMembers
Shipping and Auditing Rust in Production
Cargo workspaces as architecture enforcement, a checklist for auditing unsafe, and hardening: panics, supply chain, fuzzing.
- 01Cargo Workspaces for Multi-Crate ServicesWorkspace dependency unification, shared lints, and how compile-time crate boundaries enforce your architecture.25mPremium
- 02Auditing unsafe: Finding, Bounding, JustifyingWhat unsafe actually permits, cargo-geiger discovery, the SAFETY: comment discipline, and Miri for verification.30mPremium
- 03Production Hardening: Panics, Dependencies, and FuzzingPanic policy and worker isolation, cargo audit/deny/vet supply-chain hygiene, and proptest/cargo-fuzz for the gaps.25mPremium