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.
trait-tacticsMacros that provide common patterns for implementing traits in terms of other traits1,772MIT
owned-futureTurn borrowed futures into owned futures1,772MIT
prealloc_ref_vecCreate temporary `Vec`s of references without allocating/deallocating (useful for realtime code)1,772MIT
functionateAutomatically implement Fn* traits for structs and enums1,769MIT
cmd_errorSimple crate to print an error message and exit while unwrapping Options and Results1,769MIT OR Apache-2.0
serde_table_internalsProc-macro crate for serde_table.1,767MIT OR Apache-2.0
array_exEasy and powerful compile-time array initialization.1,766MIT OR Apache-2.0
aoi_macrosmacros for aoi1,764MIT
yolo-blockLike a `try` block, but automatically unwraps the result.1,762MIT OR Apache-2.0
seek-extExtension trait to add convenience methods to `io::Seek` types1,759MIT/Apache-2.0
transferCrate that exposes a Transfer trait, that is to move what Clone is to copy1,756MIT OR Apache-2.0
cor_iterCorrelate of two iterators1,755BSD-2-Clause
rust-automataA framework and a DSL for building finite state machines in Rust1,752MIT
breakable-blockA shim library for a stable implementation of what is proposed in RFC 2046.1,750MIT OR Apache-2.0
doublysureUsing types to make sure that you're sure, sure, and doubly sure1,749MIT
convertable-errorsThis crate defines an ergonomic macro for deriving From<Foreign> conversions for variants of Rust enums.1,747MIT
telemetry-safe-tracing-macrosTracing proc macros for telemetry-safe1,746MIT OR Apache-2.0
telemetry-safeCompile-time safe telemetry formatting facade crate1,746MIT OR Apache-2.0
ra2-mixRed Alert 2 MIX file format library for reading and writing MIX archives1,743MPL-2.0
no-std-thiserrorthiserror but no_std compatible1,742MIT OR Apache-2.0
all-is-bytesBecause everything is just a bunch of bytes... right?1,742Unlicense
flat-dropWrapper that drops recursive objects iteratively to avoid stack overflows.1,739MIT OR Apache-2.0
countedEfficient reference counted collections.1,738MIT OR Apache-2.0
bsetFast and compact sets of bytes or ASCII characters1,735MIT
derive-patchMacro to generate a struct with all field Optional (`partial!`) and another macro to generate a patch (`patch!`).1,735non-standard
tearorEasily turn data races into data corruption!1,734CC0-1.0
cf-modkit-canonical-errorsModKit canonical error types based on Google AIP-193 error model1,731Apache-2.0
fold-licenseFolding licenses from multiple dirs with `cargo`/Cargo.toml and `yarn`/package.json.1,728MIT
better-numBetter numeric types in rust1,724MIT
simple_detailed_errorStack and specify errors explainations saying what happened, why, how, where, how to solve it and its causes1,724non-standard
array-as-structA crate to make ergonomic "field" accesses on array types1,722MIT OR Apache-2.0
purpureaAttribute based accessor/updater/mutator/constructor generation.1,722MIT
err_orSmall lib that helps converting `Option<E>` into `Result<_, E>`1,722non-standard
closCommon Lisp Object System for Rust programming1,722 GPL-2.0-or-later
rhs_first_assignAn attribute macro to hack compound assignment.1,721MIT OR Apache-2.0
arg_attrSpecify the accepted arguments depending on configuration conditional checks.1,721MIT OR Apache-2.0
nutype_test_utilErgonomically create newtypes in tests1,721MIT OR Apache-2.0
netlitExpress literal IP addresses and socket addresses directly in code1,717Apache-2.0 OR MIT
fn-composeA small macro for function composition1,715MIT
telemetry-safe-tracingTracing integration for telemetry-safe1,713MIT OR Apache-2.0
codedconcrete error type with an `ErrorKind` enum matching Google's "canonical error codes"1,713MIT/Apache-2.0
extract_macroA macro to extract a value from a pattern.1,709MIT OR Apache-2.0
fmt-utilsVarious utilities for use with std::fmt::Display and fast_fmt::Fmt1,706CC0-1.0
atomic-env-rsAtomic Execution Enviornment1,705MIT
autotrait2generate trait definitions from impl blocks1,704MIT OR Apache-2.0
static_leakLeak references with static lifetimes from static Mutexes and RwLocks1,703MIT OR Apache-2.0
symbolismUnique symbols made from human readable tags.1,703MIT OR Apache-2.0
discrimenumDerive `Hash` and `PartialEq` on enums where only the discriminant matters.1,702MIT OR Apache-2.0
cincin - a utility that simplifies command-line input in Rust, especially mimicking C++-style input1,697MIT
once-optionA `OnceOption` type, similar to `Option`, with the constraint that once emptied it cannot be re-set to contain a value. Useful…1,696MIT OR Apache-2.0
buffedTraits & implementation of parsing buffered IO1,696MIT OR Apache-2.0
atomflagAtomics for your bitflags!1,690MIT
lisbeth-tuple-toolsA set of tools for tuple manipulation1,684MIT
default_kwargsThe macro wich enables you to use default and keyword arguments in Rust1,683MIT OR Apache-2.0
ro_cellA (mostly) readonly cell1,681MIT OR Apache-2.0
atomic_pincellThreadsafe pinnable RefCell1,677Apache-2.0/MIT
rusty-typeshA flexible type pattern matching system for Rust1,676MIT
spidermemeTraits to test for type equality and type inequality1,675MIT OR Apache-2.0
karpal-coreHKT encoding, Functor, Semigroup, Monoid for the Industrial Algebra ecosystem1,675Apache-2.0
env_astenv! but it outputs tokens instead of a string literal1,674MIT
indynSquatted; generic inline DSTs with the erasable crate once ptr_metadata is stable1,672MIT OR Apache-2.0
rscontainerManages dependencies between objects.1,671MIT OR Apache-2.0
entwineGeneric slice-like interface for operating on multiple slices at the same time1,671MIT OR Apache-2.0
fields-globDerived glob macro with the same name as the structure1,670MIT
dynamic-structA derive macro for creating push-based reactive properties for structs with named fields.1,668MIT OR Apache-2.0
lift-failA library to handle `failure` in an iterable collection.1,667MIT/Apache-2.0
split-optionalIt split from a source `str` to `Option<&'a str>` per an element.1,665MIT
supply-chain-trust-example-crate-000038derive(Error)1,660MIT OR Apache-2.0
tidy-buildertidy-builder is a builder generator that is compile-time correct1,659MIT
expecto-patronumA library to add beatiful animals to your panic outputs1,658MIT
noerrorderive(Error)1,657MIT OR Apache-2.0
on_demandA macro to generate aux macros for on-demand usage.1,656MIT OR Apache-2.0
dyn_vecA Vec<T: ?Sized>1,656MIT OR Apache-2.0
market_typesCommon implementations of a market1,654MIT
type_atUtility trait to index type of Rust tuples.1,652MIT/Apache-2.0
thalo-filestoreIn-memory event store persisted to file for crates.io/thalo1,651MIT OR Apache-2.0
non-zeroA macro for creating constant non-zero integers (with type inference).1,651MIT OR Apache-2.0
atomintTrait for mapping integer types to their corresponding atomic types.1,649MIT
size-traitTraits for restricting the size of type parameters.1,647non-standard
const_stringify_intsConverts (generic) constant integers to &'static str1,646MIT OR Apache-2.0
drogue-bazaar-coreA place to find tools for building your Rust application (Core)1,645Apache-2.0
polymorphA few utilities to better enable polymorphic behavior in Rust.1,645Apache-2.0
hostlessHostless1,644Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
supply-chain-trust-example-crate-000046A RAII scope guard that will run a given closure when it goes out of scope,
even if the code between panics (assuming unwinding…1,644MIT OR Apache-2.0
optional-indexOptional indexing operations.1,643MIT OR Apache-2.0
utils-plugsdesign pattern, new data structure1,640MIT OR Apache-2.0
read_lines_intoRead lines (from a Path, File, etc.) into a struct (a String, a Vec<String>), and with various ways to handle line endings and…1,639MIT OR Apache-2.0 OR GPL-2.0 OR GPL-3.0
cart_prodCartesian product of iterators.1,635MIT OR Apache-2.0
uncheck-ordWrapper type to easily convert Ord to PartialOrd. inspired by std::cmp::Reverse1,634MIT OR Apache-2.0
dizpachoLess boilerplate for implementing traits1,634MIT OR Apache-2.0
strut-deserializeDeserialization utilities. Part of the Strut family.1,634MIT
placeholder_closureScala's Placeholder Syntax for Rust.1,633CC0-1.0
interstitiumFundamental, distilled traits for interop between crates. Like serde, but for everything else.1,627MIT
write-onlyReferences/slices that provide write-access, but no read-access.1,626MPL-2.0
deer-macrosA backend-agnostic fail-slow deserialization framework1,626MIT OR Apache-2.0
supply-chain-trust-example-crate-000054Flexible concrete Error type built on std::error::Error1,625MIT OR Apache-2.0
unsafe-coerceUnsafe utilities to coerce or ignore types1,624MPL-2.0
anystackFlexible and comprehensive error handling.1,622MIT OR Apache-2.0
familiarreserve1,621MIT
filecasterProcedural macro to derive configuration from files, with optional merging capabilities.1,620MIT OR Apache-2.0
stats_traitsTraits for collection-like types to calculate statistics1,617MIT
sobSerializable Owned/Borrow. `Cow`-like type with no `Clone` requirement, implements Serialize and Deserialize1,616WTFPL
rjwindowAutomatically disappearing data structure1,616non-standard
supply-chain-trust-example-crate-000034A macro for declaring lazily evaluated statics in Rust.1,615MIT OR Apache-2.0
shardizeproc macro that generates code to create a sharded form of an existing container1,615MIT OR Apache-2.0
simple_statemachineStatemachine defined via a simple and easy-to-read domain-specific language1,612MIT
string-eyreConvenience traits for dealing with errors that don't want to eyre1,611MIT OR Apache-2.0
subslice-to-arrayExtract fixed-range subslices as arrays, with compile-time checks1,611MIT OR Apache-2.0
read-cellRead-only Cell counterpart1,609MIT OR Apache-2.0
internodeSmart references to your graph nodes.1,607MPL-2.0
shellderA lightweight, type-safe dependency injection and application framework for Rust inspired by Spring.1,607Apache-2.0
diesel_as_wrapA crate helping to wrap types to support (de)serialization using diesel.1,605GPL-3.0
turron(upcoming) Rusty NuGet Client and Toolkit1,603Apache-2.0
currycomposeA crate providing a trait for performing currying (and non-currying) function-composition in rust.1,602MIT
id_cacheA cache data structure which generates sequentially-assigned ids for unique values1,601MIT
rwtypesAdds methods to read/write binary numbers to the Read and Write traits1,601Unlicense
negative-type-boundprovides negative type bound1,598MIT
is_not_testedHelper attribute for `cargo-is-tested`, along with `is_tested`1,597MIT
co_heapReserved. Heap cooperation for **safe** applications & libraries.1,597Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
mallera rust library crate that calls closures depending on the input data1,595Apache-2.0 OR Unlicense
optimistic-cella simple lock-like structure for low-overhead optimistic concurrency1,591GPL-3.0
supply-chain-trust-example-crate-000037derive(Error)1,591MIT OR Apache-2.0
bull-be-like-cow-mut`Cow`'s non-clone-bearing counterpart with the power of mutation.1,589MIT OR Apache-2.0
nclosureProvides composable, nameable closure types with separated states and functionality for use in APIs where anonymous types are…1,588MIT
with-thread-localA micro crate that simplifies a bit the use of the std macro `thread_local!`1,587MIT OR Apache-2.0
enum-conversionA set of traits and macros for deriving conversion traits between enums and the types in their variants.1,587GPL-2.0-or-later
error-stack-macrosMacros for the `error-stack` crate1,586MIT
thalo-schemaCode generator based on aggregate schemas1,586MIT OR Apache-2.0
field_iteratorA derivable trait for iterating over the fields of a struct.1,584MIT
peekable-fwd-bwdIterator Peekable with multi-forward-peek and multi-backward-peek1,584MIT OR Apache-2.0
change_streamA Stream that only emits if the value is different.1,584MIT OR Apache-2.0
reflectix-macrosPrimitive run-time type reflection for Rust1,582GPL-3.0-or-later
raw_slice[WIP] Safe raw access to slice fields.1,578MIT OR Apache-2.0
funcall-macrosProcedural macros for the funcall library1,578MIT
cached_fieldProc macro to cache associate function result on strut field. An analogy to python's @cached_property class decorator.1,577MIT
fibre_iocA flexible, thread-safe and dynamic Inversion of Control (IoC) container for Rust.1,576MPL-2.0
anycowA supercharged container for read-heavy, occasionally-updated data structures with multiple storage strategies1,574MIT
isreprGenerating validation from arbitrary memory to repr(C) types1,574MIT
iter2Iterator `chain`ing, `cmp`ing and more as free functions taking two `IntoIterator`s1,574MPL-2.0
therrorderive(Error) with a twist (based on thiserror)1,573MIT OR Apache-2.0
librustysigsRusty Signatures: A Secure Code Signing System1,569Apache-2.0
runsA CLI tool to run Rust documentation tests (doctests) on standalone .rs files by generating a temporary Cargo project.1,567MIT
kizunaA simple service locator1,567MIT
ownagePerform a massive ownage of your variables! Clone into closure without macros.1,566MIT OR Apache-2.0
sync_streamAggregate multiple streams by polling stream items in order, keeping the consumption of multiple streams in sync.1,566MIT OR Apache-2.0
window-sort-iteratorAn iterator adapter that sorts items within a sliding window1,565MIT
checked_clampClamp alternative that returns a result instead of panicking1,565MIT OR Apache-2.0
vecliteA lightweight, ergonomic wrapper around Vec<T> that implements Display1,565MIT OR Apache-2.0
opcode-macrosMacros for opcodes encoded in bit fields1,564MIT
rw-builderProvides a convenient way to build `std::io::Read`ers and `std::io::Write`rs by chaining transformations1,564MIT OR Apache-2.0
io-result-extExtension methods for std::io::Result1,563CC0-1.0
reuseTraits and derive macros for efficiently reusing your stucts or enums with any lifetime requirement1,561MIT OR Apache-2.0
derive-allDerive macro that derives all macros possible.1,561MIT OR Apache-2.0
deerA backend-agnostic fail-slow deserialization framework1,560MIT OR Apache-2.0
kozosyntax sugars for structs1,559MIT
better-refcellA drop-in replacement for RefCell with safe unborrow and reborrow capabilities.1,558MIT OR Apache-2.0
nested-refReferences to data contained in one or more nested RefCells1,556MIT OR Apache-2.0
n_bestConvenient collection to gather the N highest elements, and discard the others1,555MIT OR Apache-2.0
impl_ops_cmpimpl_ops_cmp Macros for easy operator overloading without Copy derive.1,555MIT
melcomeExplicitly notate the distortion between the `Display`ed and its intention effortlessly.1,554MIT OR Apache-2.0
enum_parseProcedural macro generating boilerplate code for parsing enum variants1,554MIT
enumexDerive Macro for Plain Enum1,552Apache-2.0
temp-instProvides safe lifetime-erased representations for objects with lifetime parameters. Can be used to pass an object across an API…1,552MIT OR Apache-2.0
ax-linked-list-r4lLinked lists that supports arbitrary removal in constant time1,551Apache-2.0
giveupUser-geared error messages and hints1,550MIT
magic_mapDeclaration-site, fallible struct/enum mapping — automap between types you don't own (DB rows, prost protos, DTOs) with strict,…1,548MIT OR Apache-2.0
fuck-backslashA simple crate to replace the backslash with slash in-place in your PathBuf.1,545MIT
u-plusPretty Unicode code point literals: U+12345 instead of '\u{12345}'1,544non-standard
mutslicesProvides the ability to create many mutable slices of a vector.1,543MIT
serde_tableWrite structs in an easy table format.1,542MIT OR Apache-2.0
try_from_tup_macroLibrary for implement from tuple trait1,542GPL-3.0-or-later
persian_str_rsThis library provides functions for working with Persian strings in Rust.1,542non-standard
macro_rules_recExpand syntax of `macro_rules` to enable self recursive call1,535MIT
break-block-macroA little syntactic sugar to tide us over until the `?` operator can be used to exit try-catch scopes1,534MIT OR Apache-2.0
typechainCreate chains of trait objects1,531MIT OR Apache-2.0
guard-clauseSyntactic sugar for writing simple guard clauses.1,529MIT OR Apache-2.0
lit-vekiter! and vek! macros for nicer literal syntax1,527MIT OR Apache-2.0
repr-discriminant-deriveDerive macro to generate a method to access the discriminant of an enum variant with a repr(T) at runtime1,526MIT
padded-iteratorAn iterator that can be padded to a specified length1,523MIT OR Apache-2.0
handlevecSmall abstraction over index-style iteration over a vector, with deletion, insertion, and other operations on the vector while…1,521MIT OR Apache-2.0
template-builderA rust library for making idiomatic, declarative, builder-like patterns that use the struct literal syntax.1,519LGPL-3.0
whassupAsk what's up, get a status back1,518MIT OR Apache-2.0
hash-that-setImplements hashing for sets and maps themselves. Enables a map of maps to values, or a map of sets to values.1,517Apache-2.0
statenumA library for enabling enums in state-pattern logic.1,515MIT
optifierRust macros for deriving optional types1,515MIT OR Apache-2.0
rithmicOdds & ends: Algorithms, data structures, helpers1,513MIT
abstract-bitsTurn any combination of bit and byte fields into a structs1,512Apache-2.0 OR MIT
subcutaneousDependency-injection framework inspired by the Bevy Engine1,510EUPL-1.2
plectrumAn easy way to represent lookup tables in a db as rust enums1,509MIT
typestate-enumA macro to help build simple Typestate APIs.1,508MIT
is_send_syncMacro to tell if a type is Send/Sync.1,507MIT/Apache-2.0
async_as_symmetric_coroutinesHelpers to use `async` code as symmetric coroutines in stable Rust.1,507Unlicense
chain-readerCombining multiple [`Read`] instances into a sequential read pipeline with configurable error handling1,506MIT
kvtreeHeterogenous in memory key value tree storage1,505BSD-3-Clause
stated-scope-guardA more flexible RAII pattern for stated resouce management.1,500MIT OR Apache-2.0
slots-sliceProvides utilities for manipulating slices of optional values.1,498MIT-0
newtypedecldeclarative newtype macro1,498MIT OR Apache-2.0
nexcore-errorZero-dependency error handling for NexVigilant Core ecosystem1,497MIT OR Apache-2.0
timeout-macro-parseA companion-crate for the tokio-timeout proc-macro-lib1,494MIT
seekable-iteratorTraits for iterators and lending iterators with seeking capabilities1,493MIT OR Apache-2.0