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.
patchable-macroMacro suite for the patchable crate: enables model with #[patchable_model] and automatic trait derives for Patchable and Patch.437MIT OR Apache-2.0
anylmThe universal API for all AI services that you know435MIT
oopsie-coreCore error types and trace capture for the oopsie error-handling library434MIT OR Apache-2.0
aridAn ergonomic object-model for Rust.432MIT
typeshaper-macrosProc-macro internals for the typeshaper crate — do not use directly432MIT OR Apache-2.0
karpal-schubert-typesSchubert intersection type system for the Industrial Algebra ecosystem426Apache-2.0
karpal-opticsProfunctor optics (Lens, Prism) for the Industrial Algebra ecosystem424Apache-2.0
vouchedA derive macro for validated tuple-struct wrappers.424MIT OR Apache-2.0
dizzyMacros for safely interacting with DST newtypes423MIT
bauerA derive macro for automatically generating builders423Apache-2.0
annotate-buildBuild-script support for generating annotate environments422MIT
return-okMacros for dealing with Options and Results where you shouldn't421MIT OR Apache-2.0
constrangeiterConstant iterators for ranges419MIT
unwrap_unreachableProvides `Option::unreachable()` and `Result::unreachable()` methods417MIT
smart-formatComposable, zero-allocation Display formatting combinators for Rust.417MIT/Apache-2.0
rs-schema-deriveProcedural macros to derive `rs-schema` types from Rust code structures.415MIT OR Apache-2.0
no-copyA simple packer, but no implement copy412MIT
itemize_derive_implImplementation details for itemize derive macros412MIT OR Apache-2.0
perfectionistAdditional linting rules for Rust projects412MIT
bind2Generate some let statements, similar to bind, but very lightweight409MIT
siSI and IEC prefixes406Apache-2.0 OR MIT
semisafeSemi-safe utilities for performance-critical Rust405MIT or Apache-2.0
structible-macrosProc macros for structible399MIT
scopeguard-liteA lightweight way to defer execution of a block to the end of the scope, and to run code during an unwind.396MIT OR Apache-2.0
bilockA minimal spin-lock based two-handle `Arc<Mutex<T>>` replacement388ISC OR MIT OR Apache-2.0
active-reportingA custom error wrapper for detailed logs385MIT
enum_isEnum helper derive: auto-generate is_<variant>() methods for enums384MIT
functora-taggedLightweight, macro-free newtypes with refinement and derived traits.383MIT
dynpatch-macroProcedural macros for dynpatch - #[patchable], #[patch_impl], #[patch_trait]380MIT
error-locationA lightweight utility for capturing and displaying error locations in Rust380MIT
typeshaperTypeScript utility-type idioms (Omit, Pick, Merge, Partial…) for Rust structs — one-line type algebra expressions379MIT OR Apache-2.0
annotateAnnotation framework for Rust functions and modules376MIT
infiltraitA procedural macro that automatically generates trait definitions from implementation blocks374MIT OR Apache-2.0
other-errorSmall wrapper for sharing or combining errors373Apache-2.0 OR MIT
komadoriMulti-reduction library. Provides a composable, declarative way to consume an iterator369MIT OR Apache-2.0
functoraMissing pieces of the Rust standard library.368MIT
spread_patternsSome macros to make it easier to do pattern matching over strings, arrays, etc.365MIT
sealedstructGenerate boilerplate code to transition from raw (unchecked) structs to sealed (validated) structs363MIT
action_dispatch_core通用的基于属性宏的 Action 注册与分发系统361MIT OR Apache-2.0
nekopas2rust-macros...360MIT OR Apache-2.0
rootcause-preformatPreformatting support for the rootcause error reporting library359MIT/Apache-2.0
action_dispatch_macro通用的基于属性宏的 Action 注册与分发系统357MIT OR Apache-2.0
oopsieErgonomic, structured error handling: context selectors, traced errors, and rich colorized reports355MIT OR Apache-2.0
itemizeTraits for flattening heterogeneous, nested inputs into a single iterator354MIT OR Apache-2.0
syan-macroSyntactic and structural parser fundamentals, reimplementing syn crate351MIT
struct-to-enumDerive macros to generate enums from struct fields - compile-time safe field selection and dispatch351MIT OR Apache-2.0
ai-quick-errorA no_std fork of quick-error350MIT/Apache-2.0
charon-errorStructured error and panic handling with rich reports and bug reporting functionality348MIT OR Apache-2.0
structural-typingType-level field presence tracking for Rust structs, inspired by TypeScript348MIT OR Apache-2.0
anon_iterReturn different Iterator types from function returning `-> impl Iterator`345MIT OR Apache-2.0
error-kitA comprehensive error handling library for Rust applications343BSD-3-Clause
anvilforge-spark-deriveProc macros for Spark: #[derive(Spark)], #[spark::action], #[spark::mount], #[spark::updated], #[spark::on].342MIT
bronzite-client🔮 Client library for querying the Bronzite compile-time reflection daemon from proc-macros341MIT OR Apache-2.0
anvilforge-cast-deriveCast ORM derive macros: #[derive(Model)], #[has_many], #[belongs_to], #[scope].341MIT
const-toolsUtilities to help write safe const fns such as destructuring and array operations.339MIT OR Apache-2.0
stackbox_2`&own`ing references in stable Rust - no_std-friendly Box332Zlib OR MIT OR Apache-2.0
optionize-macrosThe procedural macro engine powering the optionize crate329MIT
error-accumulatorUtility to make it easier for developers to write input validation.328MIT OR Apache-2.0
flowstateWorkflow runtime powered by finite state machines.328MIT OR Apache-2.0
karpal-freeFree constructions (Coyoneda, Yoneda) for the Industrial Algebra ecosystem327Apache-2.0
oyui-rune-actionsA declarative framework for defining nested action hierarchies, generating handler traits, and registering bindings automatically…325MIT OR Apache-2.0
async-dropxA practical crate for async destructors in Rust323MIT
stable_identifierConvenience library for working with identifier types323MIT
structibleA macro for defining virtual structs backed by maps320MIT
read-only-deriveProc-macro support crate for read-only319MIT OR Apache-2.0
audit-trailStructured audit logging with tamper-evident chaining. Every write produces a cryptographically linked record (hash chain).…319Apache-2.0 OR MIT
decimal_scaled_macrosCompile-time decimal literal proc-macros for the decimal-scaled crate — one per width tier (`d18!`, `d38!`, `d57!`, `d76!`,…313MIT OR Apache-2.0
field-kinds-deriveProc-macro implementation for field-kinds311MIT
enum-from-discriminant-deriveMacro to implement TryFrom<Integers> for enum discriminants303Unlicense
tendrilsTiny, flexible helpers for managing shared state (Arc<Mutex<T>> / Arc<RwLock<T>>) safely in async Rust.302MIT
itemize_deriveDerive macros for the itemize crate301MIT OR Apache-2.0
arity-indexBounds-check-free niche integer index types (U3-U7) with double-ended range iterators299MIT
duration-extErgonomic extension trait for creating std::time::Duration from numeric literals294GPL-3.0-only
karpal-arrowCategory and Arrow hierarchy for the Industrial Algebra ecosystem293Apache-2.0
fuzzy-cmpFast, lightweight fuzzy string comparison library for Rust with multiple similarity strategies: byte-level, word-level,…288MIT
const-map-arrayMap arrays in a const context.287MIT OR Apache-2.0
typeshift-deriveProc-macro derive support for typeshift284MIT
hsmc-macrosProcedural macro implementation for the hsmc crate.283MIT
read-onlyRead-only field exposure and safe composition helpers via proc macros282MIT OR Apache-2.0
errcraftBeautiful, structured, and colorful error handling for Rust.279MIT
better-conversionsSafe and explicit numeric conversions with range and precision checking279MIT OR Apache-2.0
oyui-taskerA macro-driven event loop and background task orchestration framework for asynchronous Rust applications.278MIT OR Apache-2.0
optionizeA procedural macro to generate optionized versions of structs for partial configurations, updates, and builders277MIT
anvilforge-deriveProc macros for Anvilforge: FormRequest, Job, Migration, Listener.277MIT
changeset-sagaSaga pattern for atomic multi-step operations273MIT
tryphonType-safe configuration loading from environment variables using derive macros273MIT
qail-macroProcedural macros for QAIL - compile-time validated database queries272MIT
event_chainsA flexible event processing pipeline with middleware support272MIT
facet-mietteDerive miette::Diagnostic for facet types - rich error reporting with source spans272MIT OR Apache-2.0
bento-kitA bento box of common Rust utilities: id generation, timing, masking269MIT OR Apache-2.0
decycle-implInternal implementation for decycle macros266MIT
nohasherNo-op hasher265MIT OR Apache-2.0
okerrErgonomic result / error handling helpers built on anyhow and thiserror.265MIT
uor-prism-verifyThe Prism replay façade: a thin verification surface re-exporting `certify_from_trace`, `Certified`, and the wire-format types…265MIT
n-observerAn async/await observer pattern implementation.263MIT OR Apache-2.0
loose_enumA macro for defining loose repr enums.260MIT OR Apache-2.0
partial-cmp-deriveDerive PartialEq, Eq, PartialOrd, Ord, and Hash with fine-grained control over field comparison257MIT
disDis(playish): Wrappers, trait extensions and asserts to wrap type(s) implementing Display and an optional extra. Use with…254BSD-2-Clause OR Apache-2.0 OR MIT
capsec-tokioAsync capability-gated wrappers for tokio — the async counterpart to capsec-std253Apache-2.0
varchainAsync-only chain-based variable lookup engine, support no_std with alloc.252MIT
xiaoyong-valueCollection of sharing state primitives for async contexts (both Sync and !Sync)250MIT OR Apache-2.0
reliakit-coreShared building blocks for Reliakit: a clock-agnostic Clock trait with manual and monotonic clocks. no_std and zero-dependency.250MIT
reliakit-collectionsBounded and reliability-oriented collection types for Rust.247MIT
crdt-migrate-macrosProc macros for crdt-migrate: #[crdt_schema] and #[migration]246MIT OR Apache-2.0
bearivesome derive macros i wrote245non-standard
capsecCompile-time capability-based security for Rust244Apache-2.0
aerroCross-service gRPC error framework for Rust.244MIT OR Apache-2.0
czsc-deriveInternal proc-macro of the czsc framework (普通用户请用 `czsc` facade): #[derive(CZSCErrorDerive)] auto-implements From<anyhow::Error>…244MIT
backerror-macrosJava style backtrace for Rust243Apache-2.0
karpal-recursionRecursion schemes (cata, ana, hylo, para, apo, histo, futu, zygo, chrono) for the Industrial Algebra ecosystem242Apache-2.0
locksThread-safe type wrappers241MIT
pick-by-autoderefPick by autoderef: a compile-time dispatch by priority241non-standard
tower-resilience-outlierOutlier detection pattern for Tower services - fleet-aware instance ejection241MIT OR Apache-2.0
qubit-argumentStructured, ownership-preserving argument validation for Rust applications238Apache-2.0
reliakit-circuitClock-agnostic circuit breaker for fault isolation and fast failure. no_std and zero-dependency.237MIT
pud-macrosGenerate typed, composable, no-std-friendly modifications (“puds”) for Rust structs.236WTFPL
bwu_reduxAsync Redux-style state management for Rust, native and WASM234MIT OR Apache-2.0
ddd_cqrs_esA lightweight DDD, CQRS, and Event Sourcing framework for Rust232MIT
judiciousA rate-limiting library that enforces a cooldown period after a resource has been used (return-time based).232non-standard
error-collectionA generic collection around dynamic errors230MIT OR Apache-2.0
fack-coreCore trait definitions for fack error handling library230GPL-3.0
tramli-pluginsPlugin pack for tramli — audit, eventstore, observability, resume, idempotency, hierarchy, diagram, docs, lint, testing, subflow229MIT
pyenum-derive#[derive(PyEnum)] procedural macro for the `pyenum` crate.228MIT
any-trait-macromacros used by the any-trait crate227EUPL-1.2
hsmcHierarchical state machines (statecharts) with a declarative proc macro.227MIT
bronzite-macros🔮 Proc-macros for Bronzite compile-time type reflection - inspect traits, fields, and methods at compile time226MIT OR Apache-2.0
mce-libMarkdown Code Extractor library (part of mce): Collect code blocks from your README.md (or another Markdown file). Optional…225BSD-2-Clause OR Apache-2.0 OR MIT
rakka-macrosProcedural macros for rakka — `#[derive(Actor)]`, `props!`, `#[derive(Receive)]`.221Apache-2.0
karpal-effectMonad transformers and effect system for the Industrial Algebra ecosystem220Apache-2.0
junkdrawerA crate for all kinds of utilities.216MIT OR Apache-2.0
placid-macroSeparated ownership and in-place construction in Rust214MIT OR Apache-2.0
decycle-macroSolve circular trait obligation210MIT
rt-events-dagType-safe event DAG topology. Edges are event types; structural checks are walks.210MIT OR Apache-2.0
iter_seq_extIterator extension for sequential items.209MIT
result-aat-coreThe Infomation and Result Trace crate207Apache-2.0
reliakit-deriveDerive macros for reliakit traits, implemented with only the standard library proc-macro API and no third-party dependencies.207MIT
trame-runtimeRuntime traits and implementations for trame205MIT OR Apache-2.0
action_dispatch通用的基于属性宏的 Action 注册与分发系统,支持正则匹配、优先级、全局同步执行模式205MIT OR Apache-2.0
charon-loggingStructured logging setup using tracing, with span trace capture via tracing-error204MIT OR Apache-2.0
collect_failableA trait for collecting values into a container which has an invariant to uphold and whose construction may fail204MIT OR Apache-2.0
genies_auth整合DDD与Dapr 的 auth 库200MIT/Apache-2.0
try-cloneFallible cloning.199MIT
scoped-errorStructured error handling with semantic context trees.199Apache-2.0 WITH LLVM-exception
kenzu-macroProcedural macros for builder pattern generation and validation196MIT OR Apache-2.0
reliakit-retrySmall, runtime-agnostic retry helpers for fallible operations. Sync and async, never sleeps internally, no_std-friendly,…192MIT
qubit-local-filesLocal filesystem utilities for Rust191Apache-2.0
platifyStreamline cross-platform Rust development with declarative attribute macros.191MIT
error-combinatorType-driven error composition with functional combinators191MIT
reliakit-healthHealth status types and a criticality-aware aggregator for service health checks, probes, and status pages. no_std-friendly and…191MIT
elicit_dbDatabase contract interface — Props, traits, and typestate for SQL domain boundaries189Apache-2.0 OR MIT
atomr-diDependency-injection container for atomr.189Apache-2.0
phlow-buildBuild-script support for generating phlow annotation metadata189MIT
pilatusModular, extendable application framework for deterministic simulation of autonomous subsystems188MPL-2.0
terniTernary error handling: Success, Partial with measured loss, Failure. Because computation is not binary.188Apache-2.0
borrowizeDerive borrowed view structs from owned Rust structs.188MIT OR Apache-2.0
fluxo-typestate-macrosZero-cost type-state pattern via procedural macros187MIT
syanSyntactic and structural parser fundamentals, reimplementing syn crate186MIT
philiprehberger-result-extExtension traits for Result and Option with tap, map, and error accumulation186MIT
field-kindsDerive macro for compile-time struct field type introspection185MIT
handle-this-macrosProc macros for handle-this error handling crate185MIT OR Apache-2.0
str_enumSimple declarative macro for an enum with associated strings for each variant184MIT OR Apache-2.0
trisultAn accumulating alternative to standard `Result<T, E>`.183MIT OR Apache-2.0
to_segmentsErgonomic string splitting with readable methods for common manipulation tasks — cleaner alternative to .split().collect() chains180MIT
defaulted_deriveDerive macro for the IsDefault trait from the defaulted crate180MIT
pyenumExpose Rust enums to Python as real enum.Enum subclasses via PyO3.179MIT
migratexAgnostic migration toolkit library.176MIT
formatter-builderThe safe and stable builder for fmt::Formatter176MIT
cirious_codex_resultRobust result and error handling framework for the Cirious Codex ecosystem.176MIT OR Apache-2.0
only_oneProvides the OnlyOne trait, which allows less nesting when chaining results176MIT OR Apache-2.0
trisult-macrosA procedural macro module for `trisult`.176MIT OR Apache-2.0
slice-of-bytes-readerTurns an iterator of `AsRef<[u8]>` into a reader implements `std::io::Read`175MIT
parametric_deriveA derive macro to bridge complex, hierarchical data structures with optimization algorithms that use flat parameter vectors.174MIT OR Apache-2.0
floopA more convenient and less error prone replacement for loop `{ select! { .. }}`173MIT OR Apache-2.0
neuer-errorErgonomic error handling for machines and humans.173MIT
trameFormally verified partial value construction for facet172MIT OR Apache-2.0
result-aat-macrosThe Infomation and Result Trace crate172Apache-2.0
chaos_theory_deriveDerive macro for chaos_theory::Arbitrary172MPL-2.0
anyhowedAnyhow but with red 'error:' in terminal171MIT
branded-idProvides data structures which can be branded such that they only work with similarly branded integer data types.170non-standard
reliakitReliability building blocks for Rust: validated primitives, secrets, bounded collections, backoff, retry helpers, circuit…168MIT
use-checkComposable pass-fail check primitives for RustUse167MIT OR Apache-2.0
commonsensePersonal ritual library of ergonomic Rust utilities167MIT OR Apache-2.0
karpal-stdStandard prelude re-exports for the Karpal ecosystem167Apache-2.0
mce-procMarkdown Code Extractor procedural macros (part of mce): Collect code blocks from your README.md (or another Markdown file).…166BSD-2-Clause OR Apache-2.0 OR MIT
sigma-enum-macrosProcedural macros for `sigma_enum`.166MIT/Apache-2.0
reliakit-timeoutClock-agnostic deadlines and timeouts for retries and resilience. no_std and zero-dependency.166MIT
moxy-derivederive macros for moxy crate164MIT
newtype-ids-deriveDerive macros for the newtype-ids crate163MIT
hexeract-macrosProcedural macros for the Hexeract messaging framework163MIT OR Apache-2.0
kael_derive_refineableA derive macro for creating refinement types in Rust for Kael158Apache-2.0
pyo3-gatedAttribute macros to expose Rust types to Python via PyO3 from a single definition - no duplicate structs or impl blocks.158MIT
cast-specExperimental: Compile-time architectural annotations for Rust — function-shaped macros that name concepts, rules, anti-patterns,…157MIT
osmic-appPlugin system, App builder, event bus, and lifecycle157MIT
oxide-mvuA standalone MVU runtime for Rust with no_std support for embedded systems156Apache-2.0
enum-group-macros-implProcedural macros for enum grouping - companion crate for enum-group-macros155MIT
soupaProvides a macro allowing expressions to be eagerly evaluated before a scope.154MIT OR Apache-2.0
skerry_macrosProc macros for skerry.153MIT
eventide-macrosProcedural macros for the eventide DDD/CQRS toolkit: derive entities, entity ids, value objects and domain events with a single…153MIT OR Apache-2.0
rust-dixrust-dix: A Rust dependency injection framework inspired by Microsoft.Extensions.DependencyInjection152MIT
fieldwork-macroProc-macro implementation for fieldwork crate152MIT