Skip to content

Deep Reference Library

The projects are the primary path. These chapters are the deep library. Open one when the current build creates a concrete question, then return to code.

When the project forces this questionReference
Who owns the website, media, or context buffer?Ownership for AI payloads
How can a parser return views without copying?Borrowing, slices, and lifetimes
Which states belong in structs versus enums?Structs, enums, and patterns
How should absence and failure cross boundaries?Types and errors
How do model and tool adapters stay replaceable?Traits and workspaces
When should runtime provider selection use trait objects?Trait objects and runtime providers
How do fallible pipelines stay readable?Iterators and fallible transformations
How do shared buffers cross tasks safely?Smart pointers, interior mutability, Send, and Sync
What must an FFI or native model boundary guarantee?FFI and unsafe boundaries
NeedReference
Async model calls and cancellationAsync and backpressure
Bounded workers and queuesChannels, semaphores, and backpressure
A typed command surfaceClap CLI architecture
HTTP request boundariesAxum router, state, and errors
Database schema and atomic stateSQLx migrations and transactions
Restart-safe executionDurable jobs, leases, and idempotency
Upload and event streamingStreaming uploads and SSE
Identity and data isolationAuthentication, authorization, tenancy, and quotas
Logs, metrics, traces, and redactionStructured observability
Tests beyond the happy pathUnit, integration, golden, property, fuzz, and chaos tests
Deployment and recoveryContainers, health, shutdown, rollout, and rollback

Small models, tuning, security, and operations

Section titled “Small models, tuning, security, and operations”

After the product day introduces a boundary, use the Connected Mini-Projects to attack it more deeply. The packaged behavior, context, memory, tool, and replay labs are advanced hardening exercises—not prerequisites for creating your first useful artifact.