Rust Zero to Production: From Core Syntax to Async Web APIs
Move step by step from Rust syntax and ownership to a tested asynchronous web API.
Phase 1 — Core Syntax and CLI Foundations
Phase outcome: Compile, run, format, lint, and test small Rust programs; read ordinary expressions and collection code.
-
Published01
Toolchain and Cargo
Install and verify the toolchain; build, run, format, lint, and test one crate.
-
Published02
Variables and Constants
Explain inference, annotations, shadowing, constants, and explicit mutation.
-
Published03
Functions and Control Flow
Build small pure functions; distinguish statements from expressions; test branches and loops.
-
Published04
Tuples, Arrays, and Destructuring
Transform fixed-size data safely and handle indexed access without panics.
-
Published05
Vec, String, and HashMap
Parse and summarize endpoint records with safe collection APIs and Unicode-aware string handling.
-
Published06
CLI Input and Logic Boundaries
Produce an initial endpoint registry CLI using standard-library argument handling and unit tests.
Project milestone: A testable endpoint registry CLI
Phase 2 — Ownership and Borrowing
Phase outcome: Predict moves and borrows, choose owned versus borrowed data, and resolve routine lifetime diagnostics without trial-and-error cloning.
-
Published07
Ownership and Moves
Predict value validity after assignment and function calls; no cargo-cult cloning.
-
Published08
References and Borrowing
Refactor the CLI to borrow data and explain aliasing plus mutation rules.
-
Published09
Slices and Strings
Design text-processing signatures and handle UTF-8 boundaries safely.
-
Published10
Lifetimes
Resolve realistic borrowed-return-value diagnostics and avoid unnecessary `'static`.
-
Published11
Ownership-Driven API Design
Refactor the endpoint model with deliberate ownership, borrowing, and conversion boundaries.
Project milestone: An endpoint model with deliberate ownership boundaries
Phase 3 — Type Abstractions and Crate Design
Phase outcome: Organize modules, model states with types, use traits and iterators, and establish error-handling and testing conventions.
-
Published12
Structs and Methods
Introduce endpoint IDs, URLs, intervals, validation, constructors, and invariants.
-
Published13
Enums, Option, Result, and Pattern Matching
Replace flags and sentinel values with exhaustive domain states and typed failures.
-
Published14
Generics and Traits
Define repository and checker boundaries; compare generics, trait objects, and `impl Trait`.
-
Published15
Closures and Iterators
Filter, transform, aggregate, and test endpoint results without unnecessary allocation.
-
Published16
Modules, Crates, and Workspaces
Split domain, application, and adapter responsibilities into explicit module boundaries.
-
Published17
Error Handling and Testing
Establish error context, custom errors, unit/integration boundaries, fixtures, and negative tests.
Project milestone: Domain, application, and adapter crate boundaries
Phase 4 — Smart Pointers and Concurrency
Phase outcome: Select smart pointers and synchronization tools intentionally, understand Send and Sync, and use macros without hiding program structure.
-
Published18
Smart Pointers and Ownership Graphs
Choose pointer types from lifetime and sharing requirements; detect cycles and needless indirection.
-
Published19
Interior Mutability and Synchronization
Separate runtime borrow checking from cross-thread synchronization and test lock-protected state.
-
Published20
Macros and Code Generation
Write one small declarative macro, inspect expansion, and decide when a function or derive is better.
-
Published21
Threads, Send, and Sync
Parallelize blocking checks, transfer ownership into threads, and explain marker traits through behavior.
-
Published22
Channels and Shared State
Build a bounded worker prototype; compare message passing, locks, atomics, and shutdown behavior.
Project milestone: A bounded work queue with a tested shutdown path
Phase 5 — Async and Networking
Phase outcome: Understand futures, use Tokio tasks and channels, and design HTTP operations with cancellation, deadlines, and bounded concurrency.
-
Published23
Future, Poll, and Pin
Trace a minimal future and explain why executors, waking, and pinning exist without implementing a runtime.
-
Published24
Tokio Tasks and async/await
Run checks concurrently, await join results, and distinguish concurrency from parallelism.
-
Published25
Async Channels and Graceful Shutdown
Add backpressure, coordinated shutdown, cancellation safety, and deterministic tests using paused time.
-
Published26
HTTP Timeouts, Retries, and Concurrency Limits
Build the endpoint checker with explicit policy; avoid unbounded tasks and unsafe retry behavior.
-
Published27
Network Errors and Partial Failure
Classify DNS, connect, TLS, status, timeout, and cancellation outcomes and expose stable domain errors.
Project milestone: A cancellable, bounded asynchronous HTTP checker
Phase 6 — Web APIs and Production
Phase outcome: Assemble the final service, persist data, operate a background worker, add observability and security controls, and verify the deployable system.
-
Published28
Axum Routing, State, and Extractors
Expose endpoint CRUD and status routes with typed state and JSON request validation.
-
Published29
SQLx, SQLite, and Migrations
Add schema migrations, a repository adapter, transaction boundaries, and isolated database tests.
-
Published30
APIs and Background Workers
Connect scheduling, checking, persistence, and API state with graceful startup and shutdown.
-
Published31
Observability and API Security
Add structured spans, request IDs, log redaction, body/time limits, health checks, and configuration validation.
-
Published32
Integration Testing and Container Deployment
Verify API, database, worker, shutdown, and failure paths; produce a reproducible release build and runbook.
Project milestone: An integration-tested, containerized Endpoint Monitor API