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.
impl_opsMacros for easy operator overloading.340,263MIT
phantom-typeA `PhantomData` analog which prevents "parameter is never used" error, but does not produce any restrictions in contrast with…336,626MIT OR Apache-2.0
thiserror-nostd-notraitderive(Error)333,560MIT OR Apache-2.0
o2oObject to Object mapper for Rust. Derive '(Try)From' and '(Try)Into' traits.332,972MIT OR Apache-2.0
indxvecVecs sorting, merging, indexing, ranking, searching, reversing, intersecting, printing, etc.328,845Apache-2.0
threadboundMake any value Sync but only available on its original thread.320,211MIT OR Apache-2.0
access-jsonUse serde to query large nested structures in Rust. For low-effort, read-only FFI.318,341MIT OR Apache-2.0
amethyst_errorInternal error handling for Amethyst.317,780MIT/Apache-2.0
read_inputAsk for user input until the data inputted is valid317,477MIT/Apache-2.0
stringly_conversionsA crate helping to convert to/from various representations of strings.313,929MIT
generic_singletonA library crate allowing for generic singleton patterns309,534MIT OR Apache-2.0
loop-codeCode repeating macro304,601MIT OR Apache-2.0
tokio-par-utilUtilities for running computations in parallel on top of Tokio301,857Apache-2.0
rstatsStatistics, Information Measures, Data Analysis, Linear Algebra, Clifford Algebra, Machine Learning, Geometric Median, Matrix…300,117Apache-2.0
serde_str_helpersHelpers for using serde with strings289,041MIT
log_limitA rate limiting logging crate288,122MIT OR Apache-2.0
fault-injectionSimple fault injection, concurrency delay injection, and error source annotation282,886MIT OR Apache-2.0
nonzero_litEasy, safe, and fully zero-cost NonZero constants and literals.280,175MIT OR Apache-2.0 OR CC0-1.0
unzip3Same as Iterator::unzip, but for 3 items. Based on Rust 1.6 implementation.268,575MIT
state_machine_futureEasily create type-safe `Future`s from state machines — without the boilerplate.266,856Apache-2.0/MIT
standard_testA set of tests checking the properties of your impls of std traits263,143MITNFA
saturating-timeA trait for limits and saturations on types inside std::time262,826MIT OR Apache-2.0
partial-defaultProvides PartialDefault, a trait similar to Default but with fewer guarantees253,346AGPL-3.0-only
iter_num_toolsCreate simple iterators over non integer ranges. itertools + num = iter_num_tools249,424MIT
bumpalo-herdSupport for bumpalo in scoped threads & rayon247,115MIT OR Apache-2.0
slugify-rsA rust library to generate slugs from strings241,393non-standard
rent_to_ownA wrapper type for optionally giving up ownership of the underlying value.238,696Apache-2.0/MIT
derive-enum-from-intoDerive for From and TryInto for enums with single fields237,567MIT
consume_on_dropA zero-cost abstraction that allows Drop::drop to consume self by value235,666MIT
nshareConversion between n-dimensional types in different Rust crates235,369MIT
tokio-taskerLets you stop and join groups of Tokio tasks.227,783non-standard
lazy_errorsEffortlessly create, group, and nest arbitrary errors, and defer error handling ergonomically.226,838MIT OR Apache-2.0
structstruckNested struct and enum definitions226,568MIT
tuplesProvides many useful tools related to tuples225,431MIT
context-iteratorsIterators adaptors with associated read-only data.224,309MIT OR Apache-2.0
fstringsPython3 fstring interpolation in Rust224,220MIT
rsconfThe missing cargo API. A sane autoconf w/ build.rs helpers for testing for system headers, libraries, and symbols223,115MIT OR Apache-2.0
one_errOneErr to rule them all222,686Apache-2.0
typefulA collection of helper derive macros for type patterns216,832Apache-2.0 OR BSL-1.0 OR MIT
stringsliceA collection of methods to slice strings based on character indices rather than bytes214,904MIT OR Apache-2.0
yewduxErgonomic state management for Yew applications208,982MIT OR Apache-2.0
len-traitLen trait for collectons.200,941CC0-1.0
regex-macroA macro to generate a lazy regex expression200,388MIT OR Apache-2.0
peel-offPeel off a specific variant from a Rust enum, splitting it into the extracted variant and the residual197,690MIT
join_to_stringJoin a list of items to string/buffer.193,655MIT OR Apache-2.0
synonymCustomizable derive macro to create newtypes. It peeks into the underlying type to choose which traits should be implemented.192,343non-standard
message-ioFast and easy-to-use event-driven network library189,316Apache-2.0
relrcReference counted pointers, with relationships to other pointers.187,476Apache-2.0
yewdux-macrosErgonomic state management for Yew applications187,474MIT OR Apache-2.0
serde_flexitosFlexible serialization and deserialization of trait objects with Serde187,432Apache-2.0
genawaiter2-proc-macroprocedural macro for generators (genawaiter2)185,412MIT/Apache-2.0
genawaiter2-macroConvenience macros for generators (genawaiter2)185,337MIT/Apache-2.0
genawaiter2Stackless generators on stable Rust.184,538MIT
tardarExtensions for diagnostic error handling with `miette`.183,929MIT
nonzeroStatically checked non-zero integers182,430MIT
compio-send-wrapperThis Rust library implements a wrapper type called SendWrapper which allows you to move around non-Send types
between threads, as…181,735MIT/Apache-2.0
display-morehelper to display various types178,891Apache-2.0
rootcauseA flexible, ergonomic, and inspectable error reporting library for Rust177,881MIT/Apache-2.0
trait-makeUtilities for working with impl traits in Rust175,512MIT OR Apache-2.0
error-iterError::sources on stable Rust173,233MIT
progress-streamsProgress callbacks for types which implement Read/Write172,274MIT
shadow_countedAn iterator that counts every iteration in a hidden counter, nested iterators may commit the count to parents172,052MIT OR Apache-2.0
nunnythe definitive non-empty slice/array/vec library for Rust170,151MIT OR Apache-2.0
err_trailAdd context to errors through logging169,800Apache-2.0
orx-concurrent-vecA thread-safe, efficient and lock-free vector allowing concurrent grow, read and update operations.169,669MIT OR Apache-2.0
hermit-syncSynchronization primitives for kernels.169,642MIT OR Apache-2.0
error_setQuick error declarations and automatic conversions between errors for precisely typed error handling. Inspired by Zig's error set…168,758Apache-2.0
dyn-iterWrapper around `Box<dyn Iterator<Item = V> + 'iter>` to simplify your code167,926MIT
generic_once_cellA bring-your-own-mutex version of once_cell.167,737MIT OR Apache-2.0
try-traitsAlternatives to std lib traits that can fail.165,996MIT OR Apache-2.0
build_idObtain a UUID uniquely representing the build of the current binary.164,643MIT OR Apache-2.0
reexport-proc-macroRe-export a procedural macro164,239MIT OR Apache-2.0
exclusive_cellA thread-safe, non-blocking, no-std cell that can only be accessed once.164,129MIT OR Apache-2.0
snafu-virtstackA lightweight, efficient error handling library for Rust that implements virtual stack traces based on GreptimeDB's error…163,824Apache-2.0
automapSimple pattern to implement key-value maps where the value type contains the key type163,495Apache-2.0
vlogMacros to do stdout / stderr logs based on verbosity level.161,982MIT
cowstrCopy-on-Write shared strings161,926MIT OR Apache-2.0
singleDeprecated poor-man's version of Itertools::at_most_one160,677MIT OR Apache-2.0
skip_errorUtility helping skip and log Result::Error in iterations160,578MIT
terrorsergonomic and precise error handling built atop type-level set arithmetic159,693MIT OR Apache-2.0
facet-reflectBuild and manipulate values of arbitrary Facet types at runtime while respecting invariants - safe runtime reflection158,184MIT OR Apache-2.0
exhaustTrait and derive macro for working with all possible values of a type (exhaustive enumeration).157,931MIT OR Apache-2.0
boow`Borrow Or oWned` smart pointer. Alternative to Cow.156,565MIT
type-uuidSafe, stable IDs for Rust types155,614Apache-2.0 OR MIT
intertraitAllow for inter-trait casting151,233MIT OR Apache-2.0
take-staticStatic items that provide mutable access only once.149,313MIT OR Apache-2.0
event-store-adapter-rscrate to make DynamoDB an Event Store148,632MIT OR Apache-2.0
call-onceA type that can only be called sucessfully once.147,702MIT OR Apache-2.0
aws-rds-signerA Rust library for generating AWS IAM authentication tokens for Amazon RDS database connections147,408MIT
lenderA lending-iterator trait based on higher-rank trait bounds, with full std::iter::Iterator functionality145,102Apache-2.0 OR LGPL-2.1-or-later OR MIT
kameo_actorsUtility actors for kameo144,601MIT OR Apache-2.0
endian-numByte-order-aware numeric types.143,808MIT OR Apache-2.0
strongStrongly typed String143,037MIT
tuple-convAllows converting tuples of one element to vectors140,093MIT
mitseinStrongly typed APIs for non-empty collections, slices, and iterators.139,567MIT
enum-variants-stringsDerive macro for converting instances of enums to and from strs using variant names138,976MIT
pre-proc-macroProcedural marco implementations for [pre](https://crates.io/crates/pre/).138,311MIT OR Apache-2.0
preCompile-time assistance for working with unsafe code.137,859MIT OR Apache-2.0
trait-genTrait implementation generator macro137,701MIT OR Apache-2.0
inline_tweakTweak values directly from the source code136,829CC0-1.0
numeric_literalsEasily cope with numeric literals in generic Rust code135,306MIT
internshipInterned string and more134,731MIT/Apache-2.0
orx-concurrent-optionConcurrentOption is a lock-free concurrent read and write option type.134,435MIT OR Apache-2.0
transitiveTransitive derive macros for Rust.132,522MIT
macro-attr-2018This crate provides the `macro_attr!` macro that enables the use of custom, macro-based attributes and derivations.131,848MIT OR Apache-2.0
constptrNonNull without mutability130,781MIT OR Apache-2.0
code-productmacro producing multiple expansions130,707MIT OR Apache-2.0
lazyinitInitialize a static value lazily.130,641GPL-3.0-or-later OR Apache-2.0 OR MulanPSL-2.0
code-product-libmacro producing multiple expansions130,180MIT OR Apache-2.0
code-product-macromacro producing multiple expansions129,904MIT OR Apache-2.0
unsafe_cell_sliceA microlibrary for creating multiple mutable references to a slice129,793MIT OR Apache-2.0
pinned-initLibrary to facilitate safe pinned initialization129,462MIT OR Apache-2.0
dep-objDependency object: effective reactive heterogeneous container.128,874MIT OR Apache-2.0
hooq-helpersHooqMeta struct provider for hooq. (hooq 向けの HooqMeta 構造体を提供します)127,579MIT OR Apache-2.0
hooq-macrosThe simple macro that inserts a method before `?`. (`?` 前にメソッドを挿入するシンプルなマクロ)127,556MIT OR Apache-2.0
url-macroA compile-time URL validation macro. Parses and checks URLs at compile-time, converting valid URLs into `url::Url` objects.…127,395Apache-2.0 OR MIT
hooqThe simple macro that inserts a method before `?`. (`?` 前にメソッドを挿入するシンプルなマクロ)127,368MIT OR Apache-2.0
arraytoolsA variety of helpful methods for working with fixed-size arrays.127,030MIT/Apache-2.0
page-turnerA generic abstraction of APIs with pagination125,618MIT OR Apache-2.0
strum-liteLightweight declarative macro for sets of strings.125,116MIT OR Apache-2.0 OR Unlicense OR WTFPL
native_modelA thin wrapper around serialized data which add information of identity and version.123,753MIT
assert_cfgstatic assertions for crate features, with descriptive errors.122,693Zlib
cubobStructured output helpers for display mode122,481MIT
once_cell_serdeSingle assignment cells and lazy values.121,709MIT OR Apache-2.0
dogmaProvides `Named`, `MaybeNamed`, `Labeled`, `MaybeLabeled`, `Collection`, and `CollectionMut` traits.121,703Unlicense
esrsA Prima.it-opinionated library to achieve cqrs/es120,712MIT OR Apache-2.0
builder-patternA derivable macro for declaring a builder pattern.119,830MIT
healthHealth reporting and checking library118,682MIT OR Apache-2.0
ref-mapHelper trait for Option and Result to map references117,840MIT
exA libstd wrapper with more detailed errors117,223BSD-3-Clause
serde_closureSerializable and debuggable closures.
This library provides macros that wrap closures to make them serializable and debuggable.116,692MIT OR Apache-2.0
pastsMinimal and simpler alternative to the futures crate.116,331Apache-2.0 OR BSL-1.0 OR MIT
applyingApply functions in method-position.115,686MPL-2.0
enum_common_fieldsMacro for easy access to common fields of enums115,650MIT
clone-macroSuper simple utility macro for cloning before moving into a move closure/block.113,562MIT
float-derive-macrosA crate that allows deriving Eq and Hash for types that contain floating points112,210MIT/Apache-2.0
float-deriveA crate that allows deriving Eq and Hash for types that contain floating points111,533MIT/Apache-2.0
fortifyA simple and convenient way to bundle owned data with a borrowing type111,385MIT OR Apache-2.0
try-againRetry synchronous and asynchronous operations.109,859MIT OR Apache-2.0
fork_streamClone any stream `S` where `<S as Stream>::Item: Clone`108,323MIT
serde_closure_deriveSerializable and debuggable closures.
This library provides macros that wrap closures to make them serializable and…105,289MIT OR Apache-2.0
components-arenaSimple library for creating complex domain-specific self-referential data structures.105,031MIT OR Apache-2.0
genericsProvides macros for parsing generics (with optional where clause) in `macro_rules!`.104,957MIT OR Apache-2.0
inline_defaultMacro for inline Default implementation.103,412MIT OR Apache-2.0
redoUse the undo crate instead.100,763MIT OR Apache-2.0
merge-hashmapMerge multiple values into one100,748Apache-2.0 OR MIT
array_traitA generic trait for any array, with item as type and length as const parameter99,249MIT
concat-in-placeEfficient macros for concatenation of strings and vectors99,129MIT OR Apache-2.0
merge_derive-hashmapDerive macro for the merge::Merge trait99,066Apache-2.0 OR MIT
typleGeneric tuple bounds and transformations98,984MIT
is_notA procedural macro much like #[cfg(...)] that can be re-exported from a library based on enabled features98,883MIT OR Apache-2.0
partial_applicationpartial function application via the partial! macro98,339MIT/Apache-2.0
goferGofer.rs makes it easy to fetch data from any URL.97,997Unlicense
conditional-trait-genTrait implementation generator macro supporting conditional methods96,999MIT OR Apache-2.0
raw-partsErgonomic wrapper around `Vec::from_raw_parts` and `Vec::into_raw_parts`.95,760MIT
structview_deriveCustom derive for structview's View trait.93,842MIT
percoreSafe per-CPU core mutable state on no_std platforms through exception masking.93,134MIT OR Apache-2.0
structviewViewing binary data as high-level data structures, safely.92,940MIT
cuteA macro for Python-esque comprehensions92,574MIT
with_dropNostd wrapper for using a closure as a custom drop function90,485BSD-3-Clause
joinMacros which provide useful shortcut combinators, combine sync/async chains,
support single and multi thread (sync/async) step…89,143MIT
shadow-cloneA macro to clone variables into the current scope shadowing old ones.88,309MIT/Apache-2.0
bitpatternbitwise pattern matching and extracting87,968MIT OR Apache-2.0
static-condMacro for performing comparisons during macro expansion87,597MIT OR Apache-2.0
build_timestampSimple proc-macro to generate a build timestamp string as a const87,238MIT OR Apache-2.0
valqmacros for querying semi-structured data with the JavaScript-like syntax86,730MIT
parameterized_testA macro to support providing arguments to test functions.85,403MIT OR Apache-2.0
typed-generational-arenaA safe arena allocator that supports deletion without suffering from the ABA problem by using generational indices. Now with…85,347MPL-2.0
quitExit cleanly with an exit code84,661MIT OR Apache-2.0
detachhelper type for being able to detach/reatach a member item84,582Apache-2.0
known-schemesWell-known URI/IRI schemes.84,171Unlicense
rc-borrowBorrowed forms of Rc and Arc.84,108MIT OR Apache-2.0
assert-cmpConvenient assertion macros that print the failed expressions and their evaluated values83,733MIT
debug-map-sortedSorted Debug impl for HashMap83,034MIT OR Apache-2.0
impl-enumMacros that make using enums like trait objects more convenient.82,794MPL-2.0
builder-pattern-macroA macro crate for builder-pattern. Do not use this crate directly.80,802MIT
boolean-enumsGenerate enums with Yes and No variants. Supports no_std and serde.80,762MIT OR Apache-2.0
ident-mashMash idents together inside macro_rules!80,200MIT
sum_typeA convenience macro for creating a wrapper enum which may be one of several distinct types.79,441MIT
conflateMerge multiple values into one78,991Apache-2.0 OR MIT
qedCompile-time assertions78,728MIT
afarrayConvenience methods for working with ArrayFire arrays in Rust78,125Apache-2.0
intentionally-emptyAn intentionally empty crate.77,346MIT-0
sortbyadds convenient sort functions for Iterators77,034MIT
databend_educeThis crate offers procedural macros designed to facilitate the swift implementation of Rust's built-in traits, temporarily used…76,851MIT
futures-async-runtime-previewRuntime for the async/await macros in the `futures` crate.76,306MIT/Apache-2.0
tracerrCustom compile-time captured error tracing.76,164BlueOak-1.0.0
serde_traitobjectSerializable and deserializable trait objects.
This library enables the serialization and deserialization of trait objects such…76,083MIT OR Apache-2.0
wardProvides a ward! macro which returns the contents of an Option<T> and otherwise returns early, and a guard! macro, which does the…76,012MIT
alloc-checkedCollections that don't panic on alloc failures75,977MIT OR Apache-2.0
aeruginousThe Aeruginous Open Source Development Toolbox.75,701GPL-3.0
serde-constantConst values for serde75,119MIT OR Apache-2.0
conflate_deriveDerive macro for the conflate::Merge trait74,904Apache-2.0 OR MIT
fmt-cmpTraits and utilities for lexicographically comparing values in their `Display` representations74,013MIT OR Apache-2.0
bool_extA crate which defines and implements a complete set of `Option`/`Result`-style Boolean functional combinators on Rust's `bool`…74,009MIT OR Apache-2.0
parsel_deriveZero-code parser generation by using AST node types as the grammar72,787MIT
parselZero-code parser generation by using AST node types as the grammar72,290MIT
macro_constA macro for creating corresponding macro definitions for constants which evaluate to the same values.71,851MIT
dyn-contextSimple mechanism for lifetimes erasing.70,440MIT OR Apache-2.0
proc-easyMacros to make writing proc-macro crates easy69,842MIT OR Apache-2.0