Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix D — Recommended Crates by Category

Ecosystem Field Guide

Choose the Standard Path First

CLIclap indicatifWebaxum hyper towerAsynctokio futuresSerdeserde json tomlErrorsthiserror anyhowTestsproptest instaprefer boring, maintained, ecosystem-standard crates unless your constraints clearly say otherwise
CategoryCrateWhy it matters
CLIclapIndustrial-strength argument parsing and help generation
CLIarghSmaller, simpler CLI parsing when clap would be heavy
CLIindicatifProgress bars and human-friendly terminal feedback
CLIratatuiModern terminal UI development
WebaxumTower-based web framework with strong extractor model
WebhyperLower-level HTTP building blocks
WebtowerMiddleware and service abstractions that shape much of async Rust
WebreqwestErgonomic HTTP client for services and tools
AsynctokioThe dominant async runtime and ecosystem foundation
AsyncfuturesCore future combinators and traits
Asyncasync-channelUseful channels outside Tokio-specific code
SerializationserdeThe central serialization framework
Serializationserde_jsonJSON support built on serde
SerializationtomlTOML parsing and config handling
SerializationbincodeCompact binary serialization when appropriate
Error handlingthiserrorClean library error types
Error handlinganyhowErgonomic application-level error aggregation
Error handlingeyreAlternative report-focused app error handling
TestingproptestProperty-based testing
TestinginstaSnapshot testing for output-heavy code
TestingcriterionReal benchmarking and statistically meaningful comparisons
Logging/observabilitytracingStructured logs, spans, instrumentation
Logging/observabilitytracing-subscriberSubscriber and formatting ecosystem for tracing
Logging/observabilitymetricsMetrics instrumentation with pluggable backends
DatabasessqlxAsync SQL with compile-time query checking options
DatabasesdieselStrongly typed ORM/query builder
Databasessea-queryFlexible SQL query construction
FFIbindgenGenerate Rust bindings from C headers
FFIcbindgenGenerate C headers from Rust APIs
FFIlibloadingDynamic library loading
ParsingnomByte/string parsing via combinators
ParsingwinnowParser combinator library with modern ergonomics
ParsingpestGrammar-driven parser generation
CryptoringProduction-grade crypto primitives
CryptorustlsModern TLS implementation in Rust
Cryptosha2Standard SHA-2 hashing primitives
Data structuresindexmapHash map with stable iteration order
Data structuressmallvecInline-small-vector optimization
Data structuresbytesEfficient shared byte buffers for networking
Data structuresdashmapConcurrent map with tradeoffs worth understanding
UtilitiesuuidUUID generation and parsing
UtilitieschronoDate/time handling
UtilitiesregexMature regular-expression engine
UtilitiesrayonData parallelism with work-stealing

Crate Selection Rules

  • Prefer boring, battle-tested crates over novelty.
  • Prefer ecosystem-standard crates when joining an existing codebase.
  • Prefer fewer dependencies when a standard-library solution is enough.
  • Evaluate crate APIs through semver behavior, maintenance quality, docs, and unsafe surface area.