Crates
A directory of the crates people actually reach for, filed by what they are for. Every page follows the same three sections — what the crate is, the situations it fits, and a map of its API with a small call example for each item — so you can look up an unfamiliar crate the same way every time. Crate pages are contributed as markdown pull requests.
Almost nothing in Rust ships in the standard library. There is no HTTP client
in std, no JSON parser, no async runtime, no random number generator. That
looks like an omission until you notice what replaced it: a registry where any
of those is one line in a
Cargo.toml
away, and where the library you reach for is usually maintained by people who
work on that problem and nothing else.
A crate is what the
compiler builds in one go and what Cargo publishes as one unit. Publishing one
is deliberately undramatic: write a library, fill in a few fields of metadata,
run cargo publish, and it is on crates.io under a name
nobody else can take, at a version nobody can later change. Releases are
immutable — a version that exists keeps existing, byte for byte — which is why
a build that worked last year still works today, and why
semver
is load-bearing rather than advisory: the version number is the whole contract
about what a new release is allowed to break.
That low barrier is why so much of Rust's vocabulary lives outside the
language. serde decided how Rust types are serialized; tokio decided what
an async runtime looks like; rand, regex and log each became the obvious
answer without ever being blessed. None of them are standard, and all of them
are effectively universal. When a crate becomes the common answer, the crates
built on top of it interoperate for free — a logging crate and a web framework
that both speak log need no adapter between them.
The cost is that choosing is now your job. A crate with millions of downloads
may still be a thin wrapper somebody abandoned in 2019, and two crates solving
the same problem can differ enormously in what they ask of you — whether they
need an async runtime, whether they work without std, how much of their API
is unsafe, how often they break.
These pages exist to make that judgement faster: what the crate is, the
situations it actually fits, and a map of its API with a call example for
every item.
Async runtimes & concurrency
Executors, task spawning, synchronisation primitives and the machinery under them.
mio
v1.2.3A thin, portable wrapper over the operating system's readiness API — epoll, kqueue, IOCP. The event loop tokio is built on, and almost never what application code should use directly.
once_cell
v1.21.4Values initialised once, on first use: a cell you can fill later and a lazy static that runs its initialiser at first access. Most of it is now in std — this is the version for older toolchains, no_std, and the parts std still lacks.
parking_lot
v0.12.5Replacements for std's Mutex, RwLock, Condvar and Once — smaller, with no lock poisoning, and with timeouts, fairness and reentrancy that std doesn't offer.
tokio
v1.53.1The async runtime the ecosystem settled on: an executor for tasks, non-blocking I/O, timers, and the channels and locks that work across .await points.
HTTP, web & RPC
Web frameworks, HTTP clients and servers, and the protocols services talk over.
http
v1.5.0The shared vocabulary of HTTP in Rust — Request, Response, HeaderMap, StatusCode, Uri. Types only: it sends nothing and serves nothing, which is exactly why every client and server agrees on it.
Serialization & data formats
Turning values into bytes and back — JSON, TOML, binary formats, and the framework they share.
base64
v0.23.1Base64 encoding and decoding, with the alphabet and padding rules made explicit. Pick an engine — standard, URL-safe, padded or not — and call encode and decode on it.
serde
v1.0.229The serialization framework the whole ecosystem shares. Derive Serialize and Deserialize once, and your type reads and writes JSON, TOML, YAML, MessagePack and the rest without knowing about any of them.
serde_json
v1.0.151JSON for Rust: parse into your own types with from_str, write them back with to_string, or work with untyped Value when the shape isn't known ahead of time.
toml
v1.1.8+spec-1.1.0Reads and writes TOML through serde, so a configuration file deserialises straight into your own struct. Its parse errors point at the offending line with a caret, which is most of why you would pick it.
Error handling
Error types, context chains, and the derives that save writing them by hand.
anyhow
v1.0.104One error type for applications: anyhow::Error holds any error, keeps the whole chain of causes, and lets ? work everywhere without writing a single From impl.
thiserror
v2.0.20A derive for std::error::Error. Write the enum, put the message on each variant, and get Display, source() and the From conversions that make ? work — without the boilerplate, and without the macro appearing in your public API.
CLI & terminal
Argument parsing, prompts, progress bars, colour, and full terminal user interfaces.
clap
v4.6.7Command-line parsing from a struct definition: derive Parser, and the fields become flags and arguments with validation, --help, --version and error messages generated for you.
Text, parsing & Unicode
Parsers, regular expressions, case conversion, and the rules text actually follows.
heck
v0.5.0Case conversion between the shapes identifiers take: snake_case, camelCase, UpperCamelCase, kebab-case and the shouty variants — with one consistent rule for where a word begins.
regex
v1.13.1Regular expressions with a linear-time guarantee: matching can never blow up exponentially, because the engine deliberately omits backreferences and lookaround.
winnow
v1.0.4A parser combinator library: build a parser from small functions that compose, instead of writing a state machine or reaching for a regex. Parsers are ordinary functions taking &mut Stream.
Collections & data structures
Maps, sets, iterator adaptors, and containers with different trade-offs to the standard library's.
either
v1.19.0One enum — Left or Right — that lets a function return either of two unrelated types. It forwards Iterator, Read, Write, Future and Deref to whichever side it holds, so the branch disappears from the call site.
hashbrown
v0.17.1The SwissTable hash map that std::collections::HashMap is built from, available as a crate — for no_std code, custom allocators, the low-level HashTable, and lookups that don't allocate a key.
indexmap
v2.14.0A hash map that remembers insertion order and can be indexed by position. Hash lookup like HashMap, deterministic iteration like a Vec, and sorting without changing the type.
itertools
v0.15.0Extra iterator adaptors, as one extension trait: grouping, chunking, deduplication, combinations, and the Result-aware adaptors that let a fallible pipeline stay a pipeline.
slab
v0.4.12Pre-allocated storage that hands you a usize key for each value you insert. Constant-time insert, lookup and remove with no hashing and no per-element allocation — the structure behind connection tables and arenas.
smallvec
v1.16.0A Vec that keeps its first few elements inline instead of on the heap, spilling only when it outgrows them. A targeted allocation optimisation for collections that are usually small.
Machine learning
Neural networks, training and inference, and the tensor libraries underneath them.
burn
v0.22.0A deep learning framework written in Rust: tensors, autodiff, neural network layers, optimizers, a training loop and model storage, with one model definition running on GPUs, CPUs and WebAssembly.
Numerics & math
Linear algebra, arbitrary precision, statistics, and numeric traits.
nalgebra
v0.35.0Linear algebra with dimensions in the type system: vectors, matrices, transformations and decompositions, where multiplying a 3×2 by a 4×4 is a compile error rather than a runtime one.
num-traits
v0.2.19The numeric traits the standard library leaves out — Zero, One, Num, Float, PrimInt, and the checked, wrapping and saturating operations — so a function can be generic over number types.
Randomness & IDs
Random number generation, distributions, and unique identifiers.
fastrand
v2.5.0Random numbers from a free function, with no setup and no dependencies — fastrand::u32(1..=6). Fast and simple, and explicitly not cryptographically secure.
rand
v0.10.2Random number generation: a thread-local generator that needs no setup, seedable generators for reproducible runs, and the distributions and sequence operations — shuffle, choose, weighted pick — built on top.
Crypto, hashing & TLS
Hashes, ciphers, signatures, password hashing, and transport security.
digest
v0.11.3The traits every RustCrypto hash implements. Write code once against Digest and it works with SHA-2, BLAKE2, SHA-3 or MD5 — and swapping the algorithm becomes a type parameter.
foldhash
v0.2.0A fast non-cryptographic hash for hash maps and sketches, in two variants: one tuned for table lookup speed, one for statistical quality. It is hashbrown's default hasher, which is why it turns up everywhere.
rustc-hash
v2.1.3The hasher rustc itself uses: a non-cryptographic hash tuned for speed on small integer keys, with a zero-sized BuildHasher and no randomness, so iteration order is reproducible.
sha2
v0.11.0The SHA-2 family — SHA-256, SHA-512 and the truncated variants — as pure-Rust implementations of the Digest traits, with hardware acceleration where the CPU offers it.
Files, paths & OS
The filesystem, processes, signals, and the platform APIs underneath.
libc
v0.2.189Raw declarations of the platform's C library — types, constants, structs and functions, exactly as C sees them. The bottom layer under every crate that talks to the operating system, and unsafe all the way down.
Bytes, memory & layout
Buffers, zero-copy casts, allocation control, and how a type is laid out.
bytes
v1.12.1Byte buffers that slice and share without copying. Bytes clones by bumping a reference count, BytesMut splits a read buffer into frames, and the Buf/BufMut traits abstract over both.
zerocopy
v0.8.57Turns bytes into typed values without copying or unsafe. Derives prove at compile time that a type can be reinterpreted from a byte slice, so parsing a packet header is a cast rather than a field-by-field read.
WebAssembly & JS interop
Compiling to wasm, and carrying values across the boundary between Rust and JavaScript.
js-sys
v0.3.106Rust bindings for every JavaScript standard built-in — Array, Object, Map, Promise, JSON, Reflect, the typed arrays. The ECMAScript library, declared once so you need not write the extern blocks yourself.
wasm-bindgen
v0.2.129The bridge between Rust compiled to WebAssembly and JavaScript. One attribute exports Rust functions, structs and methods to JS, and declares the JS functions Rust may call.
wasm-bindgen-futures
v0.4.79Joins Rust's async to JavaScript's promises: JsFuture makes a promise awaitable, spawn_local runs a future on the browser's event loop, and future_to_promise hands one back to JS.
web-sys
v0.3.106Bindings for every browser API — the DOM, fetch, canvas, storage, events, WebGL — generated from the web platform's own WebIDL. Each type sits behind its own Cargo feature, and none are on by default.
Macros, derive & codegen
Procedural macro tooling, and the crates that generate code from a description.
bitflags
v2.13.1Turns a set of named bits into a real type. The bitflags! macro generates a struct with typed set operations, so a permissions mask stops being a bare u32 that anything can be assigned to.
proc-macro2
v1.0.107A TokenStream that works outside a procedural macro. Mirrors the compiler's proc_macro API so macro code can be unit tested, called from ordinary functions, and reused by build scripts.
quote
v1.0.47Quasi-quoting for procedural macros: write the Rust you want to generate as Rust, and interpolate values into it with #name. The output half of every macro, opposite syn.
syn
v3.0.3Parses a stream of Rust tokens into a syntax tree. The parsing half of every procedural macro — DeriveInput for derives, the Parse trait for custom syntax, and spanned errors that point at the user's code.
Logging, tracing & metrics
Recording what a program did, and shipping it somewhere it can be read.
log
v0.4.34The logging facade the ecosystem agrees on. Libraries call info! and warn! against it; the application chooses one implementation, and every library's output goes there.
Build scripts & tooling
Build-time code: compiling native sources, finding system libraries, reading versions.
cc
v1.4.5Compiles C, C++ and assembly from a build script and links the result into your crate. The standard way a Rust crate wraps existing native code — and the reason that crate needs a C compiler to build.
semver
v1.0.28Parses and compares version numbers, and evaluates the requirement syntax Cargo uses — ^1.2, ~1.2.3, >=1.0, <2.0. The same implementation Cargo itself resolves dependencies with.
No crates match your filter.