Rust reference library
Rust
cheat sheets.
HTTP services, async runtimes, and command-line tools. These references cover Axum, Tokio, and clap with Rust examples.
Rust
Axum
HTTP routing and middleware
Routing, extractors, shared state, SQLx, SeaORM, authentication, and deployment.
RoutingExtractorsSQLx & SeaORMAuthentication
4 chapters 31 topicsExplore
Rust
Tokio
Async tasks, channels, and I/O
Futures, tasks, channels, timers, cancellation, networking, and graceful shutdown.
TasksChannelsCancellation
6 chapters 26 topicsExplore
Rust
clap
Command-line argument parsing
Typed arguments, subcommands, validation, help text, shell completions, and CLI tests.
ArgumentsSubcommandsOutput & errors
5 chapters 27 topicsExplore
FIND AN EXAMPLE
What are you working on?
Go straight to the code and explanation for a specific task.
Parse an Axum requestRead path parameters, query strings, and JSON with typed extractors.Wait for async tasks in TokioCompare join!, try_join!, and select! with Rust examples.Build clap subcommandsGive each command its own typed arguments and handler.Shut down a Tokio serverStop accepting connections and let active tasks finish.Connect Axum to SQLxShare a connection pool and run queries from request handlers.Test a Rust CLICheck arguments and parse errors without exiting the test process.
Help improve CodeRef
Allow Google Analytics to measure page visits and use of the guides? It uses cookies after you accept. Your choice won’t affect access to the site. Privacy notice