CATEGORY
Rust patterns 3,906 crates
Data as of 2026-07-25 (crates.io database dump, timestamp 2026-07-25T02:00:36Z). Source: crates.io · db-dump.tar.gz · methodology & corrections.
itertoolsExtra iterator adaptors, iterator methods, free functions, and macros.1,295,966,075MIT OR Apache-2.0
thiserrorderive(Error)1,229,923,374MIT OR Apache-2.0
once_cellSingle assignment cells and lazy values.1,076,578,011MIT OR Apache-2.0
pin-project-liteA lightweight version of pin-project written with declarative macros.871,467,017Apache-2.0 OR MIT
lazy_staticA macro for declaring lazily evaluated statics in Rust.866,141,716MIT OR Apache-2.0
anyhowFlexible concrete Error type built on std::error::Error824,210,141MIT OR Apache-2.0
scopeguardA RAII scope guard that will run a given closure when it goes out of scope,
even if the code between panics (assuming unwinding…818,612,123MIT OR Apache-2.0
zerocopyZerocopy makes zero-cost memory manipulation effortless. We write "unsafe" so you don't have to.750,061,393BSD-2-Clause OR Apache-2.0 OR MIT
pin-project-internalImplementation detail of the `pin-project` crate.512,479,731Apache-2.0 OR MIT
pin-projectA crate for safe and ergonomic pin-projection.512,437,141Apache-2.0 OR MIT
bumpaloA fast bump allocation arena for Rust.486,596,584MIT OR Apache-2.0
num-conv`num_conv` is a crate to convert between integer types without using `as` casts. This provides
better certainty when refactoring,…453,211,964MIT OR Apache-2.0
powerfmt`powerfmt` is a library that provides utilities for formatting values. This crate makes it
significantly easier to support…451,445,990MIT OR Apache-2.0
zerovecZero-copy vector backed by a byte array450,648,481Unicode-3.0
zerovec-deriveCustom derive for the zerovec crate445,794,098Unicode-3.0
static_assertionsCompile-time assertions to ensure that invariants are met.429,509,865MIT OR Apache-2.0
derive_moreAdds #[derive(x)] macros for more traits407,284,962MIT
ordered-floatWrappers for total ordering on floats383,819,877MIT
quick-errorA macro which makes error types pleasant to write.317,942,173MIT/Apache-2.0
indocIndented document literals283,041,637MIT OR Apache-2.0
dyn-cloneClone trait that is dyn-compatible280,676,964MIT OR Apache-2.0
bitvecAddresses memory by bits, for packed collections and bitfields241,629,048MIT
num_enumProcedural macros to make inter-operation between primitives and enums easier.237,194,750BSD-3-Clause OR MIT OR Apache-2.0
tapGeneric extensions for tapping values in Rust235,700,509MIT
funtyTrait generalization over the primitive types232,772,540MIT
overloadProvides a macro to simplify operator overloading.220,574,027MIT
predicatesAn implementation of boolean-valued predicate functions.199,367,810MIT OR Apache-2.0
erased-serdeType-erased Serialize and Serializer traits195,749,403MIT OR Apache-2.0
ref-castSafely cast &T to &U where the struct U contains a single field of type T.188,623,814MIT OR Apache-2.0
os_str_bytesLossless functionality for platform-native strings185,806,829MIT OR Apache-2.0
predicates-coreAn API for boolean-valued predicate functions.176,371,579MIT OR Apache-2.0
predicates-treeRender boolean-valued predicate functions results as a tree.176,120,759MIT OR Apache-2.0
derivativeA set of alternative `derive` attributes for Rust175,260,047MIT/Apache-2.0
io-lifetimesA low-level I/O ownership and borrowing library169,612,355Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
derive_builderRust macro to automatically implement the builder pattern for arbitrary structs.168,663,853MIT OR Apache-2.0
option-extExtends `Option` with additional operations164,031,854MPL-2.0
new_debug_unreachablepanic in debug, intrinsics::unreachable() in release (fork of debug_unreachable)160,755,602MIT
derive_builder_macroRust macro to automatically implement the builder pattern for arbitrary structs.159,964,485MIT OR Apache-2.0
outrefOut reference140,048,295MIT
downcast-rsTrait object downcasting support using only safe Rust. It supports type
parameters, associated types, and type constraints.138,103,978MIT OR Apache-2.0
downcastTrait for downcasting trait objects back to their original types.129,082,874MIT
peeking_take_whileLike `Iterator::take_while`, but calls the predicate on a peeked value. This allows you to use `Iterator::by_ref` and…124,804,410MIT OR Apache-2.0
maplitCollection “literal” macros for HashMap, HashSet, BTreeMap, and BTreeSet.120,825,601MIT/Apache-2.0
castawaySafe, zero-cost downcasting for limited compile-time specialization.114,536,439MIT
id-arenaA simple, id-based arena.101,997,736MIT/Apache-2.0
eyreFlexible concrete Error Reporting type built on std::error::Error with customizable Reports101,088,519MIT OR Apache-2.0
rgb`struct RGB/RGBA/etc.` for sharing pixels between crates + convenience methods for color manipulation.
Allows no-copy high-level…99,947,609MIT
snafuAn ergonomic error handling library97,839,405MIT OR Apache-2.0
typed-builderCompile-time type-checked builder derive92,195,557MIT OR Apache-2.0
educeThis crate offers procedural macros designed to facilitate the swift implementation of Rust's built-in traits.91,854,842MIT
enum-ordinalizeThis library enables enums to not only obtain the ordinal values of their variants but also allows for the construction of enums…87,663,595MIT
take_mutTake a T from a &mut T temporarily75,393,691MIT
enum_dispatchNear drop-in replacement for dynamic-dispatched method calls with up to 10x the speed67,824,349MIT OR Apache-2.0
error-chainYet another error boilerplate library.67,552,543MIT/Apache-2.0
typed-builder-macroCompile-time type-checked builder derive66,926,248MIT OR Apache-2.0
enum-ordinalize-deriveThis crate provides a procedural macro that enables enums to not only obtain the ordinal values of their variants but also allows…66,087,909MIT
mietteFancy diagnostic reporting library and protocol for us mere mortals who aren't compiler hackers.62,776,948Apache-2.0
const_fnA lightweight attribute for easy generation of const functions with conditional compilations.62,326,584Apache-2.0 OR MIT
auto_implAutomatically implement traits for common smart pointers and closures60,896,245MIT OR Apache-2.0
nodropA wrapper type to inhibit drop (destructor).
***Deprecated: Use ManuallyDrop or MaybeUninit instead!***57,333,461MIT/Apache-2.0
derive-whereDeriving with custom trait bounds54,626,603MIT OR Apache-2.0
if_chainMacro for writing nested `if let` expressions.53,233,441MIT/Apache-2.0
tracing-errorUtilities for enriching errors with `tracing`.53,130,161MIT
self_cellSafe-to-use proc-macro-free self-referential structs in stable Rust.52,164,547Apache-2.0 OR GPL-2.0-only
cargo_toml`Cargo.toml` struct definitions for parsing with Serde51,329,234Apache-2.0 OR MIT
send_wrapperThis Rust library implements a wrapper type called SendWrapper which allows you to move around non-Send types
between threads, as…45,955,181MIT/Apache-2.0
bonNext-gen compile-time-checked builder generator, named function's arguments, and more!44,769,236MIT OR Apache-2.0
standbackNew standard library, old compiler.42,189,892MIT OR Apache-2.0
imgrefA basic 2-dimensional slice for safe and convenient handling of pixel buffers with width, height & stride41,457,268CC0-1.0 OR Apache-2.0
retain_mutProvide retain_mut method that has the same functionality as retain but gives mutable borrow to the predicate.38,850,112MIT
macro_rules_attributeUse declarative macros in attribute or derive position38,161,508Apache-2.0 OR MIT OR Zlib
sealedMacro for sealing traits and structures34,809,384MIT OR Apache-2.0
inherentMake trait methods callable without the trait in scope33,218,253MIT OR Apache-2.0
borrow-or-shareTraits for either borrowing or sharing data.32,331,745MIT-0
enumnConvert number to enum28,484,350MIT OR Apache-2.0
attribute-deriveClap like parsing for attributes in proc-macros26,935,387MIT OR Apache-2.0
attribute-derive-macroClap for proc macro attributes26,918,687MIT
quote-useSupport `use` in procmacros hygienically26,745,699MIT
quote-use-macrosSupport `use` in procmacros hygienically26,351,801MIT
collection_literalsEasy-to-use macros for initializing any collection25,521,281MIT
monostateType that deserializes only from one specific value25,368,348MIT OR Apache-2.0
mungeMacro for custom destructuring24,794,977MIT
munge_macroMacro for custom destructuring24,788,680MIT
rancorScalable and efficient error handling without type composition24,687,781MIT
derive_utilsA procedural macro helper for easily writing derive macros for enums.23,053,882Apache-2.0 OR MIT
static_assertions_nextCompile-time assertions to ensure that invariants are met.21,840,861MIT OR Apache-2.0
replace_withTemporarily take ownership of a value at a mutable location, and replace it with a new value based on the old one.19,379,676MIT OR Apache-2.0
archeryAbstract over the atomicity of reference-counting pointers19,063,530MIT
arcstrA better reference-counted string type, with zero-cost (allocation-free) support for string literals, and reference counted…18,780,699Apache-2.0 OR MIT OR Zlib
io-extrasFile/socket handle/descriptor utilities18,632,327Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
ghostDefine your own PhantomData17,783,147MIT OR Apache-2.0
ambient-authorityAmbient Authority17,752,122Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
ffi_helpersA crate to help make working with FFI easier.17,645,453MIT
auto_enumsA library for to allow multiple return types by automatically generated enum.17,644,721Apache-2.0 OR MIT
atomic_floatFloating point types which can be safely shared between threads16,590,166Apache-2.0 OR MIT OR Unlicense
visibilityAttribute to override the visibility of items (useful in conjunction with cfg_attr)15,935,282Zlib OR MIT OR Apache-2.0
typewittype-witness-based abstractions, mostly for emulating polymorphism in const fns15,475,770Zlib
constcatconcat! with support for const variables and expressions14,887,032MIT OR Apache-2.0
ignore-resultAdds a `Result<_, _>.ignore()` method to ignore the return value of a function call without panicking in case of error.14,850,338MIT
by_addressWrapper for comparing and hashing pointers by address14,415,729MIT OR Apache-2.0
choiceSimilar to `either` but supports an unbounded number of variants.14,219,396MIT
macro_magicAllows the exporting and importing of the tokens of items across module, file, and crate boundaries14,187,590MIT
joineryA small crate for generically joining iterators with a separator13,243,043MIT
drop_bombA runtime guard for implementing linear types.12,556,877MIT OR Apache-2.0
static_initSafe mutable static and non const static initialization, and code execution at program startup/exit.11,988,265MIT OR Apache-2.0
abscissa_coreApplication microframework with support for command-line option parsing,
configuration, error handling, logging, and terminal…11,865,813Apache-2.0
mutate_onceInterior mutability, write-once and borrowable as plain &T11,595,308BSD-2-Clause
tryhardEasily retry futures11,530,009MIT OR Apache-2.0
manyhowproc macro error handling à la anyhow x proc-macro-error11,313,723MIT OR Apache-2.0
manyhow-macrosMacro for manyhow11,298,397MIT OR Apache-2.0
bencherA port of the libtest (unstable Rust) benchmark runner to Rust stable releases. Supports running benchmarks and filtering based…11,016,252MIT/Apache-2.0
trait-variantUtilities for working with impl traits in Rust11,008,855MIT OR Apache-2.0
enum-primitive-deriveenum_primitive implementation using procedural macros to have a custom derive11,001,382MIT
tokio-rayonMix async code with CPU-heavy thread pools using Tokio + Rayon10,599,388MIT
condtypeChoose types at compile-time via boolean constants.9,733,064MIT OR Apache-2.0
calendrical_calculationsCalendrical calculations in Rust9,710,185Apache-2.0
uninitA collection of tools for a safer usage of uninitialized memory9,632,274Zlib OR MIT OR Apache-2.0
generational-arenaA safe arena allocator that supports deletion without suffering from the ABA problem by using generational indices.9,300,331MPL-2.0
stable-patternStable port of std::str::Pattern and friends.9,210,278MIT OR Apache-2.0
jod-threadstd::thread which joins on drop by default.8,921,058MIT OR Apache-2.0
pingora-errorError types and error handling APIs for Pingora.8,866,384Apache-2.0
extendCreate extensions for types you don't own with extension traits but without the boilerplate.8,862,241MIT
debug_unsafeUses `debug-assertions` as a switch of safe/unsafe behaviour8,549,994MIT OR Apache-2.0
qualifier_attrProcedural macro attributes for adding "qualifiers" (pub, async, unsafe, const, extern "C", ...) to various items.8,368,647MIT OR Apache-2.0
as-anyprovide the AsAny trait8,333,553MIT OR Apache-2.0
async-once-cellAsync single assignment cells and lazy values.8,172,259MIT OR Apache-2.0
anymapA safe and convenient store for one value of each type8,041,043MIT/Apache-2.0
traitfulA collection of helper macros for trait patterns7,977,110Apache-2.0 OR BSL-1.0 OR MIT
hex_litHex macro literals without use of hex macros7,931,172MITNFA
parsenicA simple no-std/no-alloc I/O and parsing crate7,678,899Apache-2.0 OR BSL-1.0 OR MIT
unchecked-indexUnchecked indexing wrapper using regular index syntax.7,375,103MIT/Apache-2.0
eagerCrate for eager macro expansion.7,330,121MIT
docifyDocify allows you to live-embed at compile time pieces of code from throughout your project as rust doc examples.7,227,045MIT
mutually_exclusive_featuresMacros to check that only none or one of a set of features is enabled at a time, as known as mutually exclusive features7,071,279MIT OR Apache-2.0
variant_countDerive macro that adds a variant count to an enum.7,070,068MIT OR Apache-2.0
auto_opsMacros for easy operator overloading.7,012,072MIT
assumeMacro for stating unsafe assumptions in Rust.6,940,652MIT OR Apache-2.0
auto_enums_coreAn internal crate to support auto_enums - do not use directly6,683,278Apache-2.0 OR MIT
auto_enums_deriveAn internal crate to support auto_enums - do not use directly6,682,755Apache-2.0 OR MIT
meteredFast, ergonomic metrics for Rust!6,444,785Apache-2.0 OR MIT
metered-macroFast, ergonomic metrics for Rust!6,443,628Apache-2.0 OR MIT
lazy_formatA utility crate for lazily formatting values for later6,351,009MPL-2.0
aspectAn Aspect Toolkit for Rust6,279,219Apache-2.0 OR MIT
aspect-weaveAn Aspect Toolkit for Rust6,260,124Apache-2.0 OR MIT
indicatif-log-bridgeBridge the log crate and indicatif to stop log lines from mixing up with progress bars6,154,995MIT
oxc_indexNewtype-style helpers for `Vec` and `usize`.5,843,090MIT
trait-setSupport for trait alias feature on stable Rust.5,772,836MIT
cargo-manifestHelper crate to parse and manipulate manifests - `Cargo.toml` files.5,643,839Apache-2.0 OR MIT
strckChecked owned and borrowed strings5,492,713MIT
cc-traitsCommon collection traits5,418,271MIT/Apache-2.0
stdextExtensions for the Rust standard library structures.5,310,493MIT
thiserror-corederive(Error)4,948,891MIT OR Apache-2.0
unwind_safeReadable unwind-safe code thanks to a try-finally-looking builder pattern4,925,647Zlib OR MIT OR Apache-2.0
option-operationsTraits and auto-implementations to improve arithmetic operations usability when dealing with `Option`s.4,918,366MIT/Apache-2.0
rsb_deriveAn opinionated macro implementation for Rust struct builder pattern with compile-time validation4,855,308Apache-2.0
rvs_deriveA helper macros implementation for Value Classes in Rust4,846,554Apache-2.0
nutypeThe newtype with guarantees.4,844,915MIT
nutype_macrosThe newtype with guarantees.4,843,668MIT
rvstructA helper macros implementation for Value Classes in Rust4,839,231Apache-2.0
spezMacro to specialize on the type of an expression4,805,433BSD-2-Clause
neverA stable version of the unstable never type (!)4,772,319BSD-3-Clause
readonlyStruct fields that are made read-only accessible to other modules4,771,557MIT OR Apache-2.0
delegate-attrAttribute proc-macro to delegate method to a field4,674,543MIT
kindedGenerate enums with same variants, but without data.4,638,663MIT
kinded_macrosGenerate enums with same variants, but without data.4,617,637MIT
tuplexRust tuple extension.4,610,284MIT/Apache-2.0
with_builtin_macros-proc_macrosHelper for macro_rules authors to chain their macros with builtin ones (such
as `env!`, `include!`, or `concat_idents!`).4,605,243Zlib OR MIT OR Apache-2.0
with_builtin_macrosHelper for macro_rules authors to chain their macros with builtin ones (such
as `env!`, `include!`, or `concat_idents!`).4,601,629Zlib OR MIT OR Apache-2.0
parity-send-wrapperThis Rust library implements a wrapper type called SendWrapper which allows you to move around non-Send types
between threads, as…4,476,901MIT/Apache-2.0
gen_opsMacros for operator overloading for generic types4,465,397MIT
derive_destructure2Destructure structs that implement Drop4,453,356MIT OR Apache-2.0
genawaiterStackless generators on stable Rust.4,392,313MIT
oxc-mietteFancy diagnostic reporting library and protocol for us mere mortals who aren't compiler hackers.4,346,970Apache-2.0
oxc-miette-deriveDerive macros for miette. Like `thiserror` for Diagnostics.4,344,741Apache-2.0
genawaiter-macroConvenience macros for generators (genawaiter)4,331,599MIT/Apache-2.0
cargo-emitTalk to Cargo easily at build time.4,317,198MIT OR Apache-2.0
variadics_pleaseImplement things as if rust had variadics4,303,443MIT OR Apache-2.0
dupeMarker for types which are cheap to clone4,245,546MIT OR Apache-2.0
dupe_deriveDerive Dupe4,244,722MIT OR Apache-2.0
interpA Rust implementation of Matlab's interp1 function4,099,883MIT OR Apache-2.0
error-stackA context-aware error-handling library that supports arbitrary attached user data4,086,360MIT OR Apache-2.0
sizeA crate for expressing, formatting, and interacting with file sizes3,897,341MIT
safe-transmuteA safeguarded transmute() for Rust3,874,862MIT
orx-split-vecAn efficient dynamic capacity vector with pinned element guarantees.3,867,287MIT OR Apache-2.0
orx-fixed-vecAn efficient fixed capacity vector with pinned element guarantees.3,837,878MIT OR Apache-2.0
orx-pinned-vec`PinnedVec` trait defines the interface for vectors which guarantee that elements added to the vector are pinned to their memory…3,835,167MIT OR Apache-2.0
orx-pseudo-defaultPseudoDefault trait allows to create a cheap default instance of a type, which does not claim to be useful.3,786,854MIT OR Apache-2.0
easy-extA lightweight attribute macro for easily writing extension trait pattern.3,786,167Apache-2.0 OR MIT
orx-concurrent-iterA thread-safe and ergonomic concurrent iterator trait and efficient lock-free implementations.3,775,552MIT OR Apache-2.0
orx-pinned-concurrent-colA core data structure with a focus to enable high performance, possibly lock-free, concurrent collections using a PinnedVec as…3,765,296MIT OR Apache-2.0
fallible_collectionsa crate which adds fallible allocation api to std collections3,756,223MIT OR Apache-2.0
orx-iterableDefines and implements Iterable, Collection and CollectionMut traits to represent types that can be iterated over multiple times.3,739,322MIT OR Apache-2.0
orx-self-orDefines SoR (self-or-ref) and SoM (self-or-mut) traits that are useful in reducing code duplication and pushing forward the…3,736,899MIT OR Apache-2.0
erasableType-erased thin pointers.3,705,274MIT OR Apache-2.0
deferUtility to defer excecution of code, inspired by go's defer statement.3,704,734MIT/Apache-2.0
orx-concurrent-bagAn efficient, convenient and lightweight grow-only concurrent data structure allowing high performance concurrent collection.3,654,866MIT OR Apache-2.0
orx-concurrent-ordered-bagAn efficient, convenient and lightweight grow-only concurrent data structure allowing high performance and ordered concurrent…3,631,811MIT OR Apache-2.0
orx-concurrent-queueA high performance and convenient thread safe queue that can concurrently grow and shrink with push, extend, pop and pull…3,600,099MIT OR Apache-2.0
orx-concurrent-recursive-iterA concurrent iterator that can be extended recursively by each of its items.3,599,480MIT OR Apache-2.0
implicit-cloneImmutable types and ImplicitClone trait similar to Copy3,593,048MIT OR Apache-2.0