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.
xbootAsync static variable initialization with priority support before program startup / 主程序运行前支持优先级的异步静态变量初始化16,968MulanPSL-2.0
pstrGlobal String Intern Pool16,965MIT
modeA behavioral state machine library written in Rust16,882Apache-2.0 OR MIT
self-referenceA Self-Reference Helper16,880non-standard
estExtensions for the rust Standard library and Tokio.16,880MIT/Apache-2.0
read-restrictRestrict the number of bytes read from a reader16,854MIT OR Apache-2.0
erosError handling that is precise, no boilerplate, ergonomic, context aware, and performant.16,851Apache-2.0
indexland_deriveDerive Macros for indexland16,841MIT
tailvecSplit Vec to mutable slice and TailVec, the TailVec can push or pop etc16,814MIT
masterrorApplication error types and response mapping16,813MIT
irox-enumsTraits for better Enumerated Types16,791MIT OR Apache-2.0
woptA procedural macro that automatically generates an Option-wrapped version of a struct, reducing boilerplate for optional updates.16,729MIT
radiationConvert Rust type into raw bytes and vice versa16,728MIT
derive-ctorAdds `#[derive(ctor)]` which allows for the auto-generation of struct, enum, and union constructors.16,725MIT
ref-opsAn escape hatch for implementing `ops` traits for references to newtypes.16,617MIT OR Apache-2.0
anonyAnonymous struct16,567MIT OR Apache-2.0
rattishCast between trait objects.16,541Apache-2.0
oofs_deriveError handling library that generates and injects context for you.16,519MIT
transitive_fromHelper macros for creating hierarchies of transitive `From` implementations.16,491MIT OR Apache-2.0
stdtoStdto provides a set of functional traits for conversion between various data representations.16,362MIT OR Apache-2.0
terminatorFormatter for pretty panics and errors16,344MIT OR Apache-2.0
zoet-macroImplementation detail for `#[zoet]` macro16,333MIT
collect_arrayAllows for collecting an Iterator into an exactly sized array.16,328BSD-3-Clause
hexga_typedefProvide a common typedef for `float`, `int` and `uint`. The precision can be changed with feature flags and can be easily shared…16,328MIT OR Apache-2.0
pinusA prickly BTreeMap. You can insert through shared references and values are pin-projected.16,274MIT OR Apache-2.0
cli_utils_hoijuiA tiny CLI utilities library,
providing functions and constants useful in many CLI tools.16,182AGPL-3.0-or-later
aspect-coreCore traits and types for aspect-oriented programming in Rust16,180MIT OR Apache-2.0
count-macroA simple Rust macro to perform compile time counting16,166MIT
namethA simple macro to generate a static &str representing the name of a function, a struct or an enum16,160MIT
foolTraits for interoperation of Boolean and sum types.16,159MIT
enThe easiest numeric traits!16,055Apache-2.0/MIT
hexga_arrayA crate that impl trait / new functions for array.15,990MIT OR Apache-2.0
aspect-macrosProcedural macros for aspect-oriented programming in Rust15,987MIT OR Apache-2.0
magic_staticGlobal singletons initialized at program start, an alternative to lazy initialization15,970MIT
powerfmt-macrosProcedural macros for `powerfmt`.
This crate is an implementation detail and should not be relied upon directly.15,944MIT OR Apache-2.0
aspect-stdStandard aspects library for aspect-rs AOP framework15,935MIT OR Apache-2.0
pinned-aliasablePin-based stopgap for unboxed aliasable values in self-referential data structures15,914MIT
hatch_resultA result-like struct that returns on Ok, instead of on Err when ? operator is used15,852MIT
umbraA macro to generate optional structs15,829MIT
unhygienicA library for stripping the hygiene out of macro parameters.15,769MIT/Apache-2.0
derive_convertDerives 'impl (Try)From for Self' and 'impl (Try)From<Self>'15,751MIT OR Apache-2.0
ranged_integersAn integer restricted to a compile-time defined bounds driven by const generics15,713MIT
citerciter15,676MulanPSL-2.0
eventuallyCrate for using Event Sourcing in Rust applications15,600MIT
gen_valueA library for indexes and values with generations for vectors.15,565MIT OR Apache-2.0
custom-formatCustom formatting for Rust.15,548MIT OR Apache-2.0
workspacer-tomlEfficiently manage and validate `Cargo.toml` files with field verification and asynchronous operations.15,529MIT OR Apache-2.0
doc-image-embedEmbed images in Rust documentation15,516MIT
structxSimulating anonymous struct and named arguments in Rust.15,494MIT/Apache-2.0
notzeromacro for constructing `std::num::NonZero*` from constants15,469Zlib
mapped-guardReturnable guards that represent for example a subset of the original borrow. Implemented for the standard guard types and easily…15,453MIT OR Apache-2.0
mapperMapping macro to help to reduce mapping boilerplate15,424MIT OR Apache-2.0
derive_variantsderives an additional enum from a nested enum that contains only variants and no nested fields15,383MIT
mem_macrosalign_of and size_of as a macro, to avoid turbofish notation15,357MIT OR Apache-2.0
scaffolding-coreA software development kit that provides the scaffolding for building applications and services using OOP.15,307Apache-2.0
degeneric-macrosHides struct generics into trait associated types15,296MIT
getters-by-typeDerive macro for adding a getter method for each type in the struct.15,289MIT
cvars-macrosConfiguration variables for games - internal crate, use the main cvars crate instead15,282AGPL-3.0-or-later
copstrCOpy STRing module15,270MIT
reactive-messagingReactive client/server communications, focused on high performance15,223Unlicense
macro-visAttribute for defining `macro_rules!` macros with proper visibility and scoping15,173MIT
gentiangentian: a proc macro that transforms generators to state machines15,167non-standard
derive-from-extDerive macro implementing 'From' for structs15,120MIT OR Apache-2.0
peek-nthAn iterator adapter that allows you to efficiently peek the nth item of an iterator.15,109MIT/Apache-2.0
cewPersonal Rust utility library15,072MIT OR Apache-2.0
components-arena-traitsDoes not intend for direct use.15,056MIT OR Apache-2.0
phlow-extensionsPhlow views for Rust's core types15,036MIT
tiptoeAn easy-to-support intrusively reference-counting smart pointer.15,033MIT OR Apache-2.0
phlow-deriveProc-macro helpers for declaring phlow extensions and views15,025MIT
pipebufEfficient byte-stream pipe buffer14,981MIT/Apache-2.0
custom-format-macrosProcedural macros for the custom-format crate.14,977MIT OR Apache-2.0
any_ofA general optional sum of product type which can be Neither, Left, Right or Both.14,905MIT
growableA growable, reusable box for Rust.14,891MIT
futures-await-test-previewAsync test support for Rust through a procedural macro. This crate defines the
`#[async_test]` attribute to make writing tests…14,847MIT
dyn-cacheQuery cache indexed by type.14,824MIT/Apache-2.0
pessimizeMore efficient Rust compiler optimization barriers14,806MPL-2.0
helperA library provided some useful proc macros for Rust.14,800MulanPSL-2.0
error-chain-mini-derivederives for error-chain-mini14,796MIT/Apache-2.0
bosFlexible Borrowed, Owned or Shared (B.O.S.) smart pointers.
Like std's Cow but with Rc/Arc and without the ToOwned requirement.14,753MIT OR Apache-2.0
mutcursorSafely stores mutable references to parent nodes, for backtracking during traversal of tree & graph structures14,725MIT OR Apache-2.0
base64_typeSimple Rust type wrapper for Vec<u8> that uses base64 for serialization14,647MIT
struct_field_namesDerive macros for generating the name of each field in a struct and each variant name in an enum as `&'static str`14,647MIT
atructmacros for anonymous structs in Rust14,584MIT
scoped-writerScoped writer utility14,583MIT
scoped-sleepRAII sleep14,580Apache-2.0
type_cellAttach values statically to a type using static get/set methods.14,576MIT OR Apache-2.0
terracottaBoilerplate webserver application based on Axum14,518MIT
larivLinked Atomic Random Insert Vector: a thread-safe, self-memory-managed vector with no guaranteed sequential insert.14,514MIT
base-traitsbase traits (for Rust)14,482BSD-3-Clause
high_mem_utilsThis crate provides a bunch of mem safe abstractions,some involving transmute.14,478Unlicense
info_utilsUtilities for displaying Options, Results, and logging in a pleasant manner14,468MIT
autocloneA simple macro to clone variables before passing them into a `move` closure or async block.14,405MIT
fn-ptrA utility crate for introspecting and rewriting function pointer types at compile time.14,379MIT
dangerous_optionThis crate provides DangerousOption - a type similar to ! in Swift language. It's basically an Option which panics if…14,367MITNFA
trampTrampoline for recursive functions, with support for mutual recursion14,330MIT
univecA vector that can hold elements of any single type14,305MIT OR Apache-2.0
sub-arrayExtract a sub-array out of an array14,229Apache-2.0
canister-toolsTools for the canisters on the internet-computer, featuring simple upgrades and data safety state snapshot upload/download…14,204non-standard
thisisplural#[derive(Plural)] for creating frictionless new types with any collection type like Vec or HashMap14,196MIT OR Apache-2.0
displaythisderive(Display)14,195MIT OR Apache-2.0
clone_cellA Cell that works with a restrictive form of Clone14,162MIT OR Apache-2.0
iterator-extAn extension to Rust's Iterator14,121MIT
rst-commonA shortcut to common Rust crates14,112Apache-2.0
solana-readonly-accountReadonly solana account field getter traits that work for both on-chain AccountInfos and off-chain Accounts14,103MIT OR Apache-2.0
error-chain-minierror-chain for minimalist14,098MIT/Apache-2.0
wherr-macroEnhance Rust errors with file and line details using the `#[wherr]` macro for clearer debugging.14,084MIT OR Apache-2.0
runestrUser-perceived characters related types and data structures14,049MIT OR Apache-2.0
strupleConvert structures from and to tuples14,032MIT OR Apache-2.0
state-machines-coreCore types and traits for the state-machines library13,949MIT OR Apache-2.0
flux-engineA modern evolution on flow-based programming (FBP).13,900Unlicense
reqwest_resumeWrapper that uses the `Range` HTTP header to resume get requests.
It's a thin wrapper around `reqwest`. It's a work in progress…13,895MIT OR Apache-2.0
state-machines-macroProcedural macros for the state-machines library13,878MIT OR Apache-2.0
irox-structs_deriveDerivable impls of the traits in irox-structs13,875MIT OR Apache-2.0
aliri_braid_examplesExamples demonstrating usage of the `aliri_braid` crate13,827MIT OR Apache-2.0
fixstrA simple library for fixing strings13,788MIT
forra compile time for loop for code generation13,782MIT OR Apache-2.0
index-extIndex slices with arbitrary ints and as arrays.13,755Apache-2.0 OR MIT OR Zlib
state-machinesType-safe state machines with hierarchical states, guards, callbacks, and async support - Rust port of Ruby's state_machines gem13,703MIT OR Apache-2.0
struple-implDerive implementation for struple::Struple13,685MIT OR Apache-2.0
transactiontransaction abstraction library (a.k.a. transaction monad)13,675MIT
certain-mapA typed map which can make sure item exist13,650MIT/Apache-2.0
interior_mutability_pointerA wrapper around `Rc<RefCell<T>>` allowing immediate access to inner methods.13,632MIT
moxieIncremental runtime for interactive software.13,628MIT/Apache-2.0
i18n_utility-rizzen-yazstonThe `i18n_utility` crate of the Internationalisation project.13,593BSD-3-Clause
stub-macrostub!() is a better version of todo!() that can be assigned to a variable13,557Apache-2.0 OR MIT
arrayboxA box with fixed capacity, backed by a byte array (it can be stored on the stack too). Implements fixed capacity `ArrayBox`.13,512MIT OR Apache-2.0
retrieve#[{pub_}mod_{pub_}use(a,b,c,...)] => {pub }mod a; {pub }use a::*; and also b,c,...13,497MIT
variant_access_traitsA set of traits and for defining a common api for Rust enums based on the std::variant api in the C++ standard library13,496MIT
elorBase generic implementation of an Either type13,490MIT
get-field-by-typeGet a value of field, based on the type of a field13,452MIT
iterchunksAn iterator adapter to adapter that yields N elements of the iterator at a time13,345MIT OR Apache-2.0
bare_err_treeDisplay errors as a formatted tree13,318MPL-2.0
fluent-comparisonsBoost readability by writing multicomparison expressions like `if any_of!({a,b,c}>=5) {...}` while keeping the benefits of…13,306MIT
more-convert-derive-internalThis crate adds macros for various conversions.13,278MIT
tiatia; trait, impl, accessors | automatic13,270MIT
const-chunksExtension trait to chunk iterators into const-length arrays.13,269MIT OR Apache-2.0
wherrEnhance Rust errors with file and line details using the `#[wherr]` macro for clearer debugging.13,261MIT OR Apache-2.0
woahA Result type that differentiates between local errors (which can be handled)
and fatal errors (which cannot)13,242MIT OR Apache-2.0
gaclen_shaderTweaked re-export of vulkano_shader! procedural macro.13,239Apache-2.0 OR MIT
const-size-flattenFlatten and FlatMap with constant inner iterator size13,231MIT
linear_typeUnique linear types for rust13,208MIT OR Apache-2.0
hexga_mathMath related crate that define number and casting, and support array programming...13,112MIT OR Apache-2.0
more-convert-deriveThis crate adds macros for various conversions.13,107MIT
pgdeA macro library for consuming PostgreSQL row data into structs.13,101MIT
certain-map-macrosA typed map which can make sure item exist13,080MIT/Apache-2.0
hexga_generationalGenVec, ideal for MAS (Multi-Agent System), where each agent can be removed at any time and has references to other agents.13,039MIT OR Apache-2.0
tailsomeBlanket traits providing `.into_ok()`, `.into_err()`, and `.into_some()` for happier method chaining.13,029MIT OR Apache-2.0
nightly2version`#[no_std]` and fast crate a Rust version to a timestamp and vice-versa (along other things)13,027MPL-2.0
operaMarker types that are easy to understand13,011MIT OR Apache-2.0
boundWrap lock guards and other structs along with the locks or other data they are derived
by shared reference from, in a struct you…13,005MIT
sumtypeGenerate zerocost anonymous sum types that implement common traits12,989MIT
roxygenSeamlessly document function parameters with rustdoc12,918MIT
vec_remove_ifExtract elements from a vector based on supplied criteria12,888MIT
rusticaRustica is a functional programming library for the Rust language.12,830Apache-2.0
more-convertThis crate adds macros for various conversions.12,811MIT
api-error-deriveA derive macro for attaching HTTP status codes and user-facing messages to Rust error types.12,808Apache-2.0
hexga_map_onDefine the map_on! macro that can be used to impl a lot of trait quickly using macros.12,795MIT OR Apache-2.0
derivedDerive macros for automating the boring stuff12,780Apache-2.0
horfimbor-eventsourcean eventsource implementation on top of kurrentdb12,768non-standard
api-errorA derive macro for attaching HTTP status codes and user-facing messages to Rust error types.12,736Apache-2.0
ddd_dapr整合DDD与Dapr 兼容基于 Eventuate 的Java 项目12,632MIT/Apache-2.0
range-cmpTrait that allows comparing a value to a range of values12,613MIT OR Apache-2.0
workspacer-toml-interfaceworkspacer-toml-interface provides a comprehensive interface for Cargo.toml manipulation, supporting versioning, dependency, and…12,604MIT
fast_new_typeA proc_macro attribute to implement common traits for a custom type wrapping other.12,478Unlicense
unwind-contextMacro to add colored panic context to your functions12,463MIT OR Apache-2.0
walleeFlexible concrete Error type built on std::error::Error with caller location tracking12,440MIT OR Apache-2.0
rustbasic-macroRust Basic : Planned Development12,435MIT OR Apache-2.0
not-found-errorConvert Option to Result using convenient functions12,392Apache-2.0 OR MIT
zedA minimal, Redux-like state management library for Rust with advanced features.12,379MIT
defer-rsDeferred execution Rust utilities.12,332MIT OR Apache-2.0
cfg-ttA procedural macro that allows using #[cfg] anywhere and at token granularity.12,301MIT
thisctxEasily create error with contexts12,269MIT OR Apache-2.0
caddPainless checked arithmetics and conversions12,241MIT OR Apache-2.0
pretty-readmeMacro to make using a README.md file as the root module documentation easy, seamless, and testable12,237LGPL-3.0-or-later
throttle_my_fnThrottle your functions12,199MIT
enum_extprocedural macro that enhances enums with additional methods and conversions12,165MIT OR Apache-2.0
boarFlexible clone on write smart pointers with Borrowed, Owned, Arc, Rc and Static variants.
Like std's Cow without the ToOwned…12,143MIT OR Apache-2.0
mapcompPython-like list comprehensions for standard containers12,119MIT OR Apache-2.0
processmanagermanage process lifecycles, graceful shutdown and process faults12,080MIT
i18n_provider-rizzen-yazstonThe `i18n_provider` crate of the Internationalisation project.12,068BSD-3-Clause
range-splitUtilities for splitting sequences with range parameters12,053MIT
function_groupA macro to hack in function overloading to rust12,002MIT/Apache-2.0
overloaded_literalsOverloaded Literals to construct your datatypes without boilerplate and with compile-time validation11,998MIT OR Apache-2.0
hash_table_datastructAdds a HashTable type, allowing to store values in a table with integer-indexed rows and hashable keys for columns11,980MIT
ln-typesCommon types related to Lightning Network11,955MITNFA
cfg_rust_featuresSet cfg options according to probing for Rust compiler, language, and library features.11,930Unlicense
i18n_lexer-rizzen-yazstonThe `i18n_lexer` crate of the Internationalisation project.11,923BSD-3-Clause
ref_wrapperWrapper of dynamically borrowed data.11,918MIT OR Apache-2.0
tapirAdding tapping functionality to rust11,916MIT
itsukimacro that defines a simple zero-based sequential enum11,916MIT
serde-partialSerde partial serialization made easy11,895MIT OR Apache-2.0
posix-errorsPosix error codes and handy functions for using them.11,878Apache-2.0
enum-extract-errorA companion crate for `enum-extract` that exports an error type.11,872MIT/Apache-2.0
ref_kindDifferent reference kinds11,864MIT OR Apache-2.0
bounded-vectorVec wrapper that guarantees upper and lower bounds on type level.11,838MIT OR Apache-2.0
struct-metadata-deriveDerive macro for the struct-metadata package.11,837MIT
iterstatsStatistics for rust iterators.11,832GPL-3.0-only
big_macA metamacro toolkit for writing complex macros.11,795MIT
select_indicesIterators for taking multiple shared/exclusive references from a slice11,793MPL-2.0
bare_err_tree_procDisplay errors as a formatted tree11,791MPL-2.0