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.

pin-initSafe pinned-initialization in Rust29,827Apache-2.0 OR MITNo standard libraryRust patterns slice_traitA generic trait for any slice, with item as a type parameter29,809MITNo standard library::No dynamic allocationRust patterns newtype-derive-2018This crate provides macros for deriving common traits for newtype structures.29,794MIT OR Apache-2.0No standard libraryRust patterns hot_reloadTrait and service definition of periodic hot reloader and notifier for config-file, KVS, etc.29,603MITFilesystemRust patterns utils-resultsThe easiest and most intuitive error handling solution.29,564MIT OR Apache-2.0No standard libraryRust patterns lifelineLifeline is a dependency injection library for asynchronous message-based applications.29,513MITAsynchronousRust patterns musli-allocatorAllocators for Müsli.29,504MIT OR Apache-2.0Memory managementNo standard library random-constructibleProvides a trait for creating random instances of enums with weighted probabilities29,496MIT OR Apache-2.0Game developmentRust patterns as_repr-coreRust trait for constant `#[repr(T)]` conversions28,903Apache-2.0 OR BSL-1.0 OR MITNo standard libraryNo standard library::No dynamic allocation setsGeneric vectors as sets. Efficiently sorting, merging, ranking, searching, reversing, intersecting, etc.28,843Apache-2.0AlgorithmsData structures push-traitPush trait for collectons.28,383CC0-1.0Data structuresNo standard library branch_hintsCrate that provides likely and unlikely branch hint functions in stable Rust.28,329MIT OR Apache-2.0No standard libraryNo standard library::No dynamic allocation errorsstd::error::Error utilities28,178MITRust patterns nzCollection of 100% safe macros for creating non-zero integers more easily.27,785Zlib OR Apache-2.0 OR MITMathematicsNo standard library serdev_deriveproc macros for SerdeV - Serde with Validation27,717MITEncodingNo standard library topographA miniscule thread pool and toposort scheduler27,495MIT OR Apache-2.0AlgorithmsConcurrency rand-constructEncapsulates the random-constructible and random-constructible-derive crates which are used for creating random instances of data…27,448Apache-2.0Game developmentRust patterns serdevSerdeV - Serde with Validation27,442MITEncodingNo standard library reusableComposable struct fields - reuse struct fields in other structs27,369MIT OR Apache-2.0Rust patterns scoped-arenaArena allocator with optional scopes27,192MIT OR Apache-2.0Memory managementNo standard library rustbasicRust Basic : Planned Development27,166MIT OR Apache-2.0Rust patternsWebAssembly self-rust-tokenizeTurns instances of Rust structures into a token stream that creates the instance26,900MITRust patterns elicitSmartPointer-like structure for polymorphism.26,897MIT OR Apache-2.0Rust patterns flux-theoryA modern evolution on flow-based programming (FBP).26,887UnlicenseAsynchronousConcurrency slice_opsA selection of useful slice operations.26,872MITAlgorithmsAsynchronous asimov-patternsASIMOV Software Development Kit (SDK) for Rust26,867UnlicenseParsing toolsRust patterns sdl3-mainTools for using SDL's main and callback APIs26,822ZlibAPI bindingsNo standard library lowdashA Lodash inspired utility library to manipulate array and object for Rust26,684MITRust patterns infinite-iteratorA trait for iterators that never end26,681MITRust patterns concat_constconst `&[u8]` and `&str` concatenation26,636MIT OR Apache-2.0No standard libraryRust patterns declarative_type_stateA collection of declarative macros to reduce boilerplate code when implementing type-state patterns26,569MITData structuresRust patterns sharded_mutexNo per-object memory overhead locks. Pseudo atomic ops for Copy/PartialEq types.26,401MIT OR Apache-2.0ConcurrencyRust patterns lifetimeTraits and derive macros to change the lifetime of a type, allowing efficient reuse of your stucts or enums with any lifetime…26,285MIT OR Apache-2.0No standard libraryRust patterns validValidate custom types by composing primitive validation functions. Use one common API for validating all kind of business rules…26,196MIT/Apache-2.0Rust patternsValue formatting bevy-butlerA crate for making Bevy systems more self-documenting26,180MIT OR Apache-2.0Game developmentRust patterns errifyFunction error context provider26,176MIT OR Apache-2.0Rust patterns partial_derive2_derivemakes all the properties of a struct type an optional property26,013MITRust patterns option_traitHelper traits for more generalized options25,941MITNo standard library::No dynamic allocationRust patterns pilgrimageA Kafka-like message broker in Rust25,896MITRust patterns id_collectionsIndex-oriented programming in Rust25,870MITData structuresRust patterns wiwiA library, of, Stuff™25,822MITRust patterns structzAnonymous struct implementation in rust25,770MIT OR Apache-2.0Data structuresNo standard library skipifTurn test cases into no-ops with _SKIPPED appended to their name based on compile time conditions.25,754Apache-2.0Development toolsDevelopment tools::Testing almost-enoughBatteries-included ergonomic extensions for the `enough` cooperative cancellation crate25,660MIT OR Apache-2.0ConcurrencyNo standard library tighterrorA minimalistic error representation framework.25,646MIT OR Apache-2.0No standard libraryNo standard library::No dynamic allocation acuUtilities for building asynchronous actors25,558MITAsynchronousConcurrency ddd-rs-derive`ddd-rs`'s proc macros.25,550MITRust patterns orion-errorStruct Error for Large Project25,535MITRust patterns reffersSmart pointers: ARef, that allows even further owner erasure than OwningRef. Strong is a memory efficient Rc + RefCell in one.…25,363Apache-2.0/MITMemory managementRust patterns explicit_castA crate for explicit widening, truncating, and sign casting of primitive integers25,344Apache-2.0 OR MITNo standard library::No dynamic allocationRust patterns lens-rs_derivemacro to derive lens for data type25,326MIT/Apache-2.0Rust patterns errify-macrosFunction error context provider (macros)25,321MIT OR Apache-2.0Rust patterns type-signature-deriveDerive macro for the `type-signature` crate. Not intended for direct use - depend on `type-signature` instead.25,264MIT OR Apache-2.0Data structuresRust patterns guardenZero-cost abstractions for scoped guards, deferred execution, and async task detachment25,259MITDevelopment toolsRust patterns guarden-macrosThe procedural macro engine powering the guarden crate25,232MITDevelopment toolsRust patterns type-signatureCompile-time stable structural hash of a Rust type, via a derive macro.25,214MIT OR Apache-2.0Data structuresEncoding io-arraysRandom-access I/O25,199Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MITRust patterns statum-coreCore types for representing legal workflow and protocol states explicitly in Rust24,826MITRust patterns variadizVariadic function support for rust24,749MIT OR Apache-2.0No standard libraryNo standard library::No dynamic allocation phlowAn engine for scripting reactive browsers in Rust by adding custom views to structures24,715MITDevelopment toolsRust patterns utils-atomicsVarious atomic utils24,701MITAsynchronousConcurrency statum-macrosProc macros for representing legal workflow and protocol states explicitly in Rust24,402MITRust patterns throwEfficiently add statically-calculated stack traces to errors.24,350MITRust patterns eventsourcingEvent Sourcing for Rust24,332Apache-2.0AsynchronousData structures ai-descriptor-deriveProvides a proc macro we can use to annotate enums for facilitating itemization and description using an AI model24,316MIT OR Apache-2.0Game developmentRust patterns bitcoinleveldb-syncRust crate for efficient, scoped synchronization using 'parking_lot' raw mutexes.24,290MITConcurrencyData structures futures-async-runtimeRuntime for the async/await macros in the `futures` crate.24,248MIT/Apache-2.0AsynchronousRust patterns syn-unnamed-structExtends syn expressions and meta structs with unnamed structs and meta lists24,204MIT OR Apache-2.0Development tools::Procedural macro helpersParser implementations option-cellOptionCell: OnceCell but derivable from Option24,095MIT OR Apache-2.0Memory managementRust patterns kv-deriveDerive struct conversions from and to key-value vectors24,082MITRust patterns facet-errorthiserror replacement powered by facet - derive Error trait from doc comments24,033MIT OR Apache-2.0Development toolsRust patterns andexSafe, strongly typed array indexes and wrappers for rust with zero dependencies23,874MITRust patterns dont_panicpanic!()-like macro that causes linking error instead of panicking. May be used to statically ensure some code won't panic.23,867MITNFANo standard libraryRust patterns cursorA more free Rust-Iterator.23,728MIT OR Apache-2.0AlgorithmsRust patterns fieldx_derive_supportDerive proc macros for fieldx_derive crate23,718non-standardConcurrencyDevelopment tools::Procedural macro helpers ai-descriptor-traitProvides an interface for the proc macro we can use to annotate enums for facilitating itemization and description using an AI…23,547MIT OR Apache-2.0Game developmentRust patterns reusing-vecWrapper over Vec that allows elements to be reused without dropping them23,523MIT OR Apache-2.0AlgorithmsData structures const-tweakerTweak constant variables live from a web GUI23,437AGPL-3.0-or-laterConfigurationDevelopment tools valuandThe value to be carried.23,411UnlicenseData structuresMathematics col_macrosA collection of general purporse macros for construct distinct types of collections.23,155UnlicenseRust patterns defer-heavyA versatile and easy to use defer statement for Rust. Similar to Go's or Zig's defer.23,105MITNo standard libraryRust patterns sort_by_deriveDerive macro SortBy and helper macros EnumAccessor and EnumSequence, deriving traits `Ord`, `PartialOrd`, `Eq`, `PartialEq` and…23,093UnlicenseDevelopment toolsDevelopment tools::Procedural macro helpers enum_propertiesA macro for declaring static properties on enum variants23,070Apache-2.0No standard libraryRust patterns smart_accessA minimalistic "lazy bidirectional pointer" framework.23,061MITData structuresNo standard library soft_assertNon-panicking assertions23,058Apache-2.0/MITRust patterns id-vecSimplify Graphs in Rust. Introduces IdVec, which automatically creates Ids for each new object, reusing deleted Ids.22,965MITData structuresMemory management structuralField accessor traits,and emulation of structural types.22,857MIT/Apache-2.0Data structuresRust patterns lens-rslens implemented in rust22,827MIT/Apache-2.0Rust patterns key-lockLibrary for mutual exclusion by keys.22,730MITAsynchronousConcurrency local-or-heapprovides a type with a pre-specified size, regardless of the size of the T type it contains, using heap allocation if necessary22,706MIT OR Apache-2.0AlgorithmsData structures log_errLog error messages from Unwrap and Expect with log crate22,681UnlicenseRust patterns bossyOpinionated convenience wrappers for `std::process::Command` and friends.22,666Apache-2.0/MITRust patterns iterator_ilpIterator extensions for instruction-parallel reductions22,625MPL-2.0AlgorithmsConcurrency implementationThe implementation crate22,591MITRust patterns once_self_cellSafe-to-use proc-macro-free self-referential structs in stable Rust.22,539Apache-2.0Memory managementRust patterns eventsourcing-deriveCustom derive macros for Eventsourcing components22,311MPL-2.0AsynchronousData structures expect-exitResult.expected(): display an error message and exit without a panic.22,091BSD-2-ClauseRust patterns iter-opt-filterAdds an optional filter to iterators.22,088MITRust patterns finnyFinite State Machines with a procedural builder-style API and compile time transition checks.22,048MIT OR Apache-2.0AlgorithmsData structures orx-treeA beautiful tree 🌳 with convenient, efficient, parallelizable growth, mutation and traversal features.22,016MIT OR Apache-2.0AlgorithmsData structures alignersUtilities for alignment guarantees for data.21,985MITMemory managementRust patterns sugarRust syntax sugar collections.21,915MITRust patterns stackvecA crate to use stack-allocated Vectors (performance and/or no-std)21,786MITMemory managementNo standard library capturMacro to capture whole structs from disjoint fields in a closure.21,780ISCRust patterns tupleopsUtility library to work with tuples21,735ISC OR MIT OR Apache-2.0Rust patterns omniswapswap values between possibly-overlapping references21,621MIT OR Apache-2.0Memory managementNo standard library fieldx_deriveDerive proc macros for fieldx crate21,577non-standardConcurrencyDevelopment tools::Procedural macro helpers set_sliceA macro for assigning values to slices21,532Apache-2.0Development tools::Procedural macro helpersNo standard library docimaGenerate images at build time & embed them in the Rust documentation21,386MIT/Apache-2.0Development tools::Build UtilsRust patterns copyvecA contiguous growable array type, with a fixed, stack-alllocated capacity that implements Copy.21,383MIT OR Apache-2.0Data structuresMemory management fieldxProcedural macro for constructing structs with lazily initialized fields, builder pattern, and serde support with a focus on…21,256non-standardConcurrencyDevelopment tools::Procedural macro helpers state-shiftMacros for implementing Type-State-Pattern on your structs and methods21,194MITDevelopment toolsRust patterns nilNoxmore's Ixperimental Lutilities21,145MIT OR Apache-2.0Rust patterns continueSwift-style continuation API21,133MIT OR Apache-2.0AsynchronousConcurrency typenum-constsProcedural macros that take a literal integer (or the result of an evaluation of simple mathematical expressions or an…21,125MIT OR Apache-2.0Development toolsMathematics publicA attribute macro used to mark struct/union and its fields as public21,116GPL-3.0Rust patterns connectmessage queue abstraction over async network streams20,994Apache-2.0AsynchronousEncoding parrot-networkExperimental public Distributed Ledger Technology (DLT)20,976MITNetwork programmingRust patterns zoetAdds `#[zoet]` macro to reduce boilerplate when implementing common traits.20,917MITDevelopment toolsDevelopment tools::Procedural macro helpers serde-feature-hackA hack to allow having a feature named serde while having serde as a dependency20,745MIT OR Apache-2.0EncodingNo standard library default-testA default trait that can be used in tests20,723MITRust patterns r3bl_reduxDEPRECATED: This crate is no longer maintained. Redux library built using Tokio20,715Apache-2.0Rust patternsWeb programming r-rustUseful tools and macros for research (WIP). Currently, a microbench probe is implemented.20,630MITDevelopment toolsRust patterns sanctum-macrosSanctum Solana Macros20,611MIT OR Apache-2.0Rust patterns eesSimple error-handling library20,604CC0-1.0Rust patterns ebacktraceA simple error wrapper which captures a backtrace and can carry an optional textual description20,584BSD-2-Clause OR MITRust patterns unborrowMacro for calling a &mut self method with transient &-borrows of self in the parameters20,570MITMemory managementRust patterns thiserror_core2derive(Error) (no_std-enabled using core2)20,445MIT OR Apache-2.0Rust patterns timeout-iteratorTimeoutIterator is a wrapper over any iterator that adds peek_timeout and next_timeout functions. The canonical use-case is…20,415Apache-2.0AsynchronousCaching assureAssure: macros for Rust runtime checks and error handling20,394MIT OR Apache-2.0 OR GPL-2.0-onlyDevelopment toolsDevelopment tools::Testing pyo3-errorUnified error causality chains across Rust and Python20,337MPL-2.0API bindingsRust patterns inline_dynA container type for storing dynamically-sized types inline20,279MIT OR Apache-2.0No standard libraryRust patterns compare_versionA Rust library for comparing semantic versioning strings and checking version compatibility.20,212MITAlgorithmsDevelopment tools oopObject-Oriented Inheritence in Rust20,137MPL-2.0Data structuresRust patterns pyderiveDerive macro of Python special methods and a class attributes for PyO320,132MIT OR Apache-2.0Rust patterns oop-macroMacros for the oop package20,065MPL-2.0Data structuresRust patterns variadiz-macrosProcedural macros implementation of variadiz20,000MIT OR Apache-2.0Development tools::Procedural macro helpersRust patterns jane-eyreBy Currer Bell19,976MIT OR Apache-2.0Rust patterns macro_rules_attrUse declarative macros as proc_macro attributes. (`#[apply]` / `#[extend]` your `macro_rules!`)19,952MITDevelopment tools::Procedural macro helpersNo standard library tldr-traitsAbstractions for TL;DR summarization using the five Ws: who? what? when? where? why?19,874UnlicenseRust patternsText processing emplacableReturn unsized values from functions19,843MIT OR Apache-2.0Memory managementNo standard library abi_stable_derive_libImplementation detail of abi_stable.19,836MIT/Apache-2.0Data structuresRust patterns error_mapperSimple and standardized Results and Errors handling accross all your projects19,803MITConfigurationData structures structural_deriveImplementation detail of the structural crate.19,672MIT/Apache-2.0Data structuresRust patterns cloudfront-logsAWS CloudFront log line parser19,636MIT OR Apache-2.0Data structuresEncoding movesliceA one-function crate to move chunks in a slice around.19,407MPL-2.0AlgorithmsNo standard library yew-callbacksCreate and manage callbacks per component without creating duplicates19,359MIT OR Apache-2.0Rust patterns model-mapper-macrosMacros for model-mapper crate19,351Apache-2.0Development toolsNo standard library enum_variant_macrosMacros to generate From & TryFrom for enums19,292MIT OR Apache-2.0Rust patterns display_withReturn opaque impl Display and/or impl Debug types via display_with and debug_with.19,212MIT OR Apache-2.0Rust patternsValue formatting thalo-macrosMacros for crates.io/thalo19,096MIT OR Apache-2.0Data structuresDatabase interfaces model-mapperDerive macro to map between different types18,975Apache-2.0Development toolsNo standard library counting-macrosStateful numeric incrementing macros18,963MIT OR Apache-2.0Development tools::Procedural macro helpersRust patterns sodService Oriented Design18,952MIT OR Apache-2.0Rust patterns cast_trait_object_macrosCast between trait objects using only safe Rust.18,917MIT OR Apache-2.0No standard libraryRust patterns redb_modelRedb model derive macro and DTO type conversion18,678MIT OR Apache-2.0Rust patterns irox-enums_deriveDerivable impls of the traits in irox-enums18,612MIT OR Apache-2.0Development toolsRust patterns oofsError handling library that generates and injects context for you.18,600MITRust patterns irox-typesEnums and structs to describe Rust's basic type system18,582MIT OR Apache-2.0Development toolsNo standard library selfrefSemi-pain-free self-referential pinned types18,575MIT OR Apache-2.0No standard libraryRust patterns fieldx_auxVarious types and tools useful for fieldx crates and, potentially, to users of fieldx18,561non-standardConcurrencyDevelopment tools::Procedural macro helpers tetsy-send-wrapperThis Rust library implements a wrapper type called SendWrapper which allows you to move around non-Send types between threads, as…18,477MIT/Apache-2.0Cryptography::CryptocurrenciesRust patterns stringplusA helper crate for dealing easily with Rust strings.18,468MITData structuresRust patterns singleton-managerA programatical singleton manager18,417MITMemory managementRust patterns const-tweaker-attributeTweak constant variables live from a web GUI18,375AGPL-3.0-or-laterConfigurationDevelopment tools doc_itemAttributes for item-level documentation customization.18,373MIT OR Apache-2.0Development toolsRust patterns enumerationAn extension to rust enum18,342MITDevelopment toolsRust patterns derive_empty_traitsderives an empty trait on structs / enums18,322MITRust patterns dynargA simple mechanism for dynamic robust argument handling18,313LGPL-3.0-or-laterConfigurationData structures cast_trait_objectCast between trait objects using only safe Rust.18,214MIT OR Apache-2.0No standard libraryRust patterns async_main_macroRuntime-agnostic async main proc macro18,204Apache-2.0 OR BSL-1.0 OR MITAsynchronousEmbedded development reaktorReaktor18,172Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MITCommand-line interfaceCommand line utilities sorted-hlistType-level heterogeneous lists with compile-time intersection and sorting using typenum.18,000MIT OR Apache-2.0Data structuresEmbedded development component_modelRevolutionary type-safe component assignment for Rust. Build complex objects with zero boilerplate using derive macros and…17,922MITAPI bindingsConfiguration curryingA crate for currying anything implementing `FnOnce`. Arguments can be passed one at a time, yielding a new something implementing…17,903MITAlgorithmsMathematics windows-helpersHelpers for the windows crate17,869MIT OR Apache-2.0Development tools::FFIRust patterns async_mainRuntime-agnostic async main proc macro17,816Apache-2.0 OR BSL-1.0 OR MITAsynchronousEmbedded development mut_familyA GAT-based library for writing code that is generic over exterior/interior mutability and mutability of references.17,737MIT OR Apache-2.0No standard libraryNo standard library::No dynamic allocation no-breakTypesafe extraction of continuation values from unbreakable control flows17,672Apache-2.0 OR MITNo standard libraryRust patterns methods-enumTwo macros for easy implementation of 'state' design pattern and other dynamic polymorphism using enum instead of dyn Trait17,670MIT OR Apache-2.0Rust patterns cvarsConfiguration variables - a simple and ergonomic way to store and edit configuration at runtime17,670AGPL-3.0-or-laterCommand-line interfaceConfiguration dyn_ordEquality and ordering for trait objects17,660MITAlgorithmsData structures rename-itemProcedural macro to rename items on declaration, according to different case styles17,649MIT OR Apache-2.0Rust patterns fedA sketch implementation of anonymous, tagged unions in stable Rust17,631Apache-2.0Data structuresRust patterns dry-modsMacros to make your module management DRY17,554MITDevelopment toolsDevelopment tools::Build Utils derive-intoA Rust derive macro for easily creating conversions between structs and enums17,536MITDevelopment toolsRust patterns amplify_derive_helpersAmplifying Rust language capabilities: helper functions for creating proc macro libraries17,522MITDevelopment tools::Procedural macro helpersRust patterns struct-metadataMacros for attaching metadata to structs.17,520MITConfigurationRust patterns exonum-cryptocurrency-advancedExonum blockchain example implementing a cryptocurrency.17,470Apache-2.0Development tools::TestingRust patterns oopsie_woopsieA crate to make debugging unexpected panics easier on end-user machines.17,422MITDevelopment tools::DebuggingRust patterns hexga_numberProvide basic trait and constant for number, and the macro map_on!.17,373MIT OR Apache-2.0MathematicsRust patterns indexlandRust Collections with Newtype Indices17,323MITData structuresMemory management kommandCommand-line arguments via function arguments17,284Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MITCommand-line interfaceCommand line utilities clap-dispatchErgonomically dispatch CLI subcommands17,198MITCommand-line interfaceParsing tools or-panicunwrap or panic17,179MIT OR Apache-2.0Development toolsNo standard library stackstackA singly linked list intended to be chained along stack frames.17,136MIT OR Apache-2.0Data structuresMemory management closetCLOSure-Enhancing Toolbox (CLOSET) provides some questionably-useful macro utilities for closures, including clone_army!, which…17,129MIT/Apache-2.0Rust patterns stdto_coreStdto provides a set of functional traits for conversion between various data representations.17,073MIT OR Apache-2.0Development toolsEncoding this-is-fine`pub type Fine<T, E> = (T, Result<(), E>);` ☕🐕17,021MIT OR Apache-2.0Rust patterns stdto_deriveStdto provides a set of functional traits for conversion between various data representations.17,007MIT OR Apache-2.0Development toolsEncoding