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.

abi_stableFor doing Rust-to-Rust ffi,writing libraries loaded at program startup.3,545,849MIT/Apache-2.0Data structuresRust patterns cmp_anyComparison for &dyn types3,520,232MIT OR Apache-2.0Rust patterns display_containerUtilities to implement Display3,506,602MIT OR Apache-2.0Rust patterns decorumTotal ordering, equivalence, hashing, and constraints for floating-point types.3,499,344MITMathematicsNo standard library abi_stable_deriveImplementation detail of abi_stable.3,497,403MIT/Apache-2.0Data structuresRust patterns la-arenaSimple index-based arena without deletion.3,485,489MIT OR Apache-2.0Data structuresMemory management thiserror-no-stdderive(Error)3,447,290MIT OR Apache-2.0Rust patterns tstrtype-level strings on stable3,424,749ZlibData structuresNo standard library display_full_errorMinimal display formatter for error chains3,402,927MITNo standard library::No dynamic allocationRust patterns include-flateA variant of include_bytes!/include_str! with compile-time deflation and runtime lazy inflation3,402,512Apache-2.0CompressionMemory management pipe-traitMake it possible to chain regular functions3,365,809MITNo standard libraryRust patterns generativityGeneration of unique invariant lifetimes3,293,994MIT OR Apache-2.0No standard libraryRust patterns text-block-macrosCreate a multiline string literal3,291,544MITNo standard libraryRust patterns assert-eq-floatThis crate provides the `assert_eq_float!` macros that support floats.3,290,415MITNo standard libraryRust patterns stackfutureStackFuture is a wrapper around futures that stores the wrapped future in space provided by the caller.3,252,135MITAsynchronousNo standard library version-syncCrate for ensuring that version numbers in README files and other files are kept in sync with the crate version.3,244,844MITDevelopment toolsRust patterns build-fs-treeGenerate a filesystem tree from a macro or a YAML tree3,215,190MITCommand line utilitiesDevelopment tools io-enum#[derive(Read, Write, Seek, BufRead)] for enums.3,203,205Apache-2.0 OR MITRust patterns embed-doc-imageEmbed images in Rust documentation2,922,502MITDevelopment toolsRust patterns dyn-hashHash trait that is dyn-compatible2,914,996MIT OR Apache-2.0No standard libraryRust patterns rentalA macro to generate safe self-referential structs, plus premade types for common use cases.2,700,934MIT/Apache-2.0No standard libraryRust patterns anymap3A safe and convenient store for one value of each type2,495,300BlueOak-1.0.0 OR MIT OR Apache-2.0Data structuresNo standard library build-timeSimple proc-macros to generate build timestamp string literals.2,492,899MITDate and timeDevelopment tools aliri_braidImprove and strengthen your strings by making them strongly-typed with less boilerplate2,463,699MIT OR Apache-2.0Data structuresRust patterns mergeMerge multiple values into one2,454,526Apache-2.0 OR MITRust patterns merge_deriveDerive macro for the merge::Merge trait2,437,076Apache-2.0 OR MITRust patterns enum-assocProcedural macro to associate constants with enum variants.2,431,488MIT OR Apache-2.0Data structuresRust patterns debug_panicThis allows a program to terminate immediately and provide feedback to the caller of the program. Unlike panic!, debug_panic!…2,344,478MITDevelopment tools::DebuggingRust patterns optfieldA macro that generates structs with optional fields2,301,951MIT OR Apache-2.0Rust patterns pawCLI argument parser.2,297,512MIT OR Apache-2.0Command-line interfaceCommand line utilities take-untilA take_until extension for iterators2,287,795MITRust patterns rust_infoExtracts the current rust compiler information.2,283,240Apache-2.0Rust patterns forward_refRust's forward_ref_* macros for easier implementation of operator overloading.2,221,663MIT OR Apache-2.0Rust patterns documentedDerive and attribute macros for accessing your type's documentation at runtime2,148,359MITRust patterns dynifyAdd dyn compatible variant to your async trait2,126,363MIT OR Apache-2.0AsynchronousNo standard library with_locals-proc_macrosTODO!2,112,585Zlib OR MIT OR Apache-2.0Rust patterns with_localsFunction attribute to return references to locals by using CPS2,105,410Zlib OR MIT OR Apache-2.0Rust patterns func_wrapHelper crate for procedural macro authors that wish to duplicate some received function inside its body, so as to be able to wrap…2,102,313Zlib OR MIT OR Apache-2.0Rust patterns owned-allocA crate to help reducing manual memory management errors.2,099,509MITData structuresMemory management unwrap-infallibleUnwrapping Result values with compile-time guarantee of infallibility2,042,200MIT OR Apache-2.0Rust patterns futures-enum#[derive(Future, Stream, Sink, AsyncRead, AsyncWrite, AsyncSeek, AsyncBufRead)] for enums.2,011,655Apache-2.0 OR MITAsynchronousNo standard library arraysConstruct an array from an iterator2,010,953MIT OR Apache-2.0Rust patterns itermore🤸‍♀️ More iterator adaptors2,010,798MIT OR Apache-2.0AlgorithmsRust patterns iterwindowsAn iterator adapter to iterate over all contiguous windows of length N1,987,445MIT OR Apache-2.0AlgorithmsRust patterns validators-deriveThe provided crate offers a procedural macro for defining validators, including optional parameters.1,893,979MITNo standard libraryParser implementations try_matchFallible pattern matching with a function-like syntax1,868,748MIT OR Apache-2.0No standard libraryRust patterns pad-adapterA utility crate that provides pad adapter.1,812,654MIT OR Apache-2.0No standard libraryRust patterns amplifyAmplifying Rust language capabilities: multiple generic trait implementations, type wrappers, derive macros1,792,041MITData structuresRust patterns parse_cfgParse and evaluate Rust's `cfg(any(condition))` attribute syntax and target triples1,787,444CC0-1.0 OR MITParsing toolsRust patterns async_fn_traitsTrait synonyms for “Fn[…]”-trait bounds returning futures1,762,861MIT OR Apache-2.0No standard libraryRust patterns eieioError Implementing `Eq + Clone` replacing `std::io::Error`1,757,688MITRust patterns shrinkwraprsAuto-derive for Rust conversion traits -- make working with newtypes a breeze1,749,796BSD-3-ClauseDevelopment toolsNo standard library genawaiter-proc-macroprocedural macro for generators (genawaiter)1,740,930MIT/Apache-2.0AsynchronousConcurrency defmacA macro to define lambda-like macros inline.1,739,702Apache-2.0/MITRust patterns amplify_derivePowerful derivation macros; part of the 'amplify' library1,729,120Apache-2.0Data structuresDevelopment tools index_vecNewtype-style helpers for `Vec` and `usize`.1,691,042MIT/Apache-2.0Data structuresNo standard library blanketA simple macro to derive blanket implementations for your traits.1,638,907MITDevelopment toolsRust patterns random-number-macro-implGenerate random numbers quickly.1,638,753MITRust patterns random-numberGenerate random numbers quickly.1,635,999MITRust patterns amplify_synAmplifying syn capabilities: helper functions for creating proc macro libraries1,585,220Apache-2.0Development tools::Procedural macro helpersRust patterns veilRust derive macro for redacting sensitive data in `std::fmt::Debug`1,581,162MIT OR Apache-2.0Development tools::DebuggingRust patterns rc-boxKnown unique versions of Rc and Arc.1,567,304MIT OR Apache-2.0Data structuresNo standard library takecellA cell type which value can only be taken once1,561,712MITConcurrencyNo standard library from_variantsRust macro to automatically generate conversions for newtype enums.1,556,168MIT/Apache-2.0Development toolsRust patterns ownableDerive macro for structs/enums with Cow, which can convert Type<'a> to Type<'static> and more1,542,424MIT OR Apache-2.0No standard libraryRust patterns enum-reprDerive enum repr conversions compatible with type aliases.1,519,218MIT OR Apache-2.0No standard libraryRust patterns dptreeAn asynchronous event dispatch mechanism for Rust1,493,252MITAsynchronousRust patterns diesel-derive-newtypeAutomatically connect newtypes to Diesel using their wrapped type1,480,035Apache-2.0/MITDatabase interfacesRust patterns const_forErgonomic for loop macro for const and no_std contexts1,475,258MITNo standard libraryRust patterns stringmatchAllow the use of regular expressions or strings wherever you need string comparison1,436,385MITAlgorithmsRust patterns concat-withExtend the function of the `concat!` macro in `std`.1,418,483MITNo standard libraryRust patterns strck_identChecked owned and borrowed Unicode-based identifiers1,416,170MITMemory managementRust patterns buildstructorMacro to derive a builder from a constructor function.1,403,175Apache-2.0Development toolsRust patterns type_hashGenerate a hash for a Rust type. The primary use-case for this crate is for detecting differences in message types between…1,402,164MITData structuresRust patterns derive-exImproved version of the macro to implement the traits defined in the standard library.1,372,773MIT OR Apache-2.0Rust patterns numeric_castSafely cast between numbers1,321,384MITNo standard libraryRust patterns assertablesAssertables: assert macros for better testing, debugging, quality assurance, and runtime reliability.1,314,774MIT OR Apache-2.0 OR BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-onlyDevelopment toolsDevelopment tools::Testing enum_delegate_libInternal macro implementations for enum_delegate - use to implement your own macros1,307,417MIT OR Apache-2.0Rust patterns enum_delegateEasily replace dynamic dispatch with an enum, for speed and serialization1,306,977MIT OR Apache-2.0Rust patterns derive_builder_macro_fork_artiRust macro to automatically implement the builder pattern for arbitrary structs.1,289,902MIT/Apache-2.0Development toolsRust patterns rama-errorerror types and utilities for rama1,289,712MIT OR Apache-2.0Rust patterns derive_builder_fork_artiRust macro to automatically implement the builder pattern for arbitrary structs.1,289,492MIT/Apache-2.0Development toolsRust patterns open-enum-deriveAn attribute for generating "open" C-like enums, those that accept any integer value, by using a newtype struct and associated…1,229,311Apache-2.0No standard libraryRust patterns open-enumAn attribute for generating "open" fieldless enums, those that accept any integer value, by using a newtype struct and associated…1,228,861Apache-2.0No standard libraryRust patterns implsDetermine if a type implements a logical trait expression.1,218,298MIT OR Apache-2.0Development tools::TestingNo standard library implicit-clone-deriveImmutable types and ImplicitClone trait similar to Copy1,196,430MIT OR Apache-2.0Rust patterns str-macroThe str!() macro, similar to vec![] but for strings1,183,274MITRust patterns ra_ap_la-arenaSimple index-based arena without deletion.1,168,935MIT OR Apache-2.0Data structuresMemory management sark0y_tam_rstAutomation tool to make Console/Terminal more comfy. Have a great Day & Night, Dear User 💯❤️1,166,552non-standardCommand line utilitiesFilesystem thiserror-ext-deriveProcedural macros for `thiserror_ext`.1,157,252Apache-2.0Rust patterns thiserror-extUseful extension utilities for `thiserror`.1,156,523Apache-2.0Rust patterns superstructVersioned data types with minimal boilerplate1,155,949Apache-2.0Rust patterns assert_unorderedA direct replacement for `assert_eq` for unordered collections1,154,590MIT OR Apache-2.0Development tools::TestingNo standard library tiny-fnType erased closures on stack1,140,080MIT OR Apache-2.0Memory managementNo standard library rust-fsm-dslMacros for rust-fsm DSL1,127,130MITData structuresRust patterns rust-fsmA framework and a DSL for building finite state machines in Rust1,126,330MITData structuresRust patterns hex-displayDisplay impl for byte slices which provides a hexdump1,116,652MIT OR Apache-2.0No standard libraryRust patterns std-nextOpinionated utilities and polyfills1,111,350MITRust patterns once_mapSingle assignment and lazy maps1,105,131MIT OR Apache-2.0CachingConcurrency tokio-async-dropmacro to enable async drop in a tokio multithreaded runtime1,100,938WTFPLAsynchronousRust patterns unchecked_unwrapAdds an unchecked version of `unwrap()` and `expect()` to Option and Result.1,065,905MIT OR Apache-2.0No standard libraryRust patterns disposeA simple wrapper for values that must be consumed on drop.1,060,375MIT OR Apache-2.0Memory managementRust patterns dispose-deriveDerive macro for the dispose crate.1,059,877MIT OR Apache-2.0Memory managementRust patterns extension-traitMacro to declare extension traits1,025,925MIT OR Apache-2.0No standard libraryRust patterns splitmutSafely retrieves multiple mutable values from the same collection.1,006,884Apache-2.0/MITRust patterns ic-cdk-executorAsync executor for `ic-cdk`968,571Apache-2.0AsynchronousRust patterns likely_stablelikely and unlikely compiler hints in stable rust961,500MIT OR Apache-2.0Hardware supportNo standard library slugifyMacro for flexible slug generation958,386MITRust patternsText processing futures-async-stream-macroImplementation detail of the `futures-async-stream` crate.956,435Apache-2.0 OR MITAsynchronousNo standard library futures-async-streamAsync stream for Rust and the futures crate.954,136Apache-2.0 OR MITAsynchronousNo standard library testresultProvides TestResult type for concise and precise test failures947,510MIT OR Apache-2.0Development tools::TestingRust patterns slice-dstSlice-based custom DSTs947,484MIT OR Apache-2.0Data structuresNo standard library derive_is_enum_variantAutomatically derives `is_dog` and `is_cat` methods for `enum Pet { Dog, Cat }`.937,721Apache-2.0/MITRust patterns debugless-unwrapUnwrap Result<!Debug, !Debug> and Option<!Debug>930,630MIT OR Apache-2.0Rust patterns inline-arrayefficient immutable inlinable byte array863,079MIT OR Apache-2.0ConcurrencyData structures parse_argTraits and implementations for parsing command-line arguments.851,751MITNFACommand-line interfaceParsing tools concat-stringProvides macros for concatenating string slices into owned strings.841,917Apache-2.0 OR MITRust patterns rusty-moneyParse, format and perform calculations with money safely.838,738MITCryptography::CryptocurrenciesData structures formatxA macro for formatting non literal strings at runtime836,700MIT OR Apache-2.0Rust patternsTemplate engine double-ended-peekableAn adapter providing peeking features to double-ended iterators.833,274MITAlgorithmsNo standard library::No dynamic allocation struct-pathA helper macros to build a string that represents struct fields path at compile time (such as <field-name>.<field-name>)817,087Apache-2.0Rust patterns safelogConditionally suppress confidential information from logs782,388MIT OR Apache-2.0Rust patterns advent-of-codeSolutions to Advent of Code781,103MITAlgorithmsRust patterns tor-checkableTypes to ensure that signed or time-bound data is validated before use780,923MIT OR Apache-2.0CryptographyRust patterns tor-unitsProvides macros for types which are constrained within a range, ensuring invalid values are unrepresentable.774,006MIT OR Apache-2.0Rust patterns simple-loggingA simple logger for the log facade773,725BSD-3-ClauseRust patternsText processing retry-errorAn error type for an operation that can fail more than once773,240MIT OR Apache-2.0Rust patterns caretMacros for declaring non-exhaustive C-style enumerations, with named members767,268MIT OR Apache-2.0Rust patterns moddefMacro for convenient module declaration. Each module can be put in a group, and visibility can be applied to the whole group with…761,626MITAccessibilityDevelopment tools fmt2ioA bridge between std::io::Write and std::fmt::Write.746,800MITNFARust patterns tor-errorProvides the unified type-erased error type returned by many (esp. high-level) Tor APIs.746,433MIT OR Apache-2.0Rust patterns tor-basic-utilsGeneral helpers used by Tor736,364MIT OR Apache-2.0Rust patterns circuitbreaker-rsA production-grade, zero-boilerplate, lock-efficient, observability-ready Circuit Breaker library732,670MIT OR Apache-2.0API bindingsAsynchronous tuple_listCrate for macro-free variadic tuple metaprogramming717,093MITData structuresRust patterns resiterHelper crate for handling iterators over result710,559MPL-2.0AlgorithmsNo standard library tor-async-utilsAsync/futures helpers for use with Tor705,524MIT OR Apache-2.0Rust patterns manifest-dir-macrosThis crate provides function-like macros to check or operate paths relative to CARGO_MANIFEST_DIR at compile time.705,185MITRust patterns custom_errorDefine custom errors without boilerplate using the custom_error! macro.693,704BSD-2-ClauseDevelopment toolsEncoding stacksafe-macroProcedural macro implementation for the stacksafe crate.689,438Apache-2.0Memory managementRust patterns stacksafePrevent stack overflow in deeply recursive functions with automatic stack management.689,179Apache-2.0Memory managementRust patterns drop_guardThe drop_guard crate enables you to implement the Drop trait on any type. So you can run a closure on any value running out of…672,308MIT/Apache-2.0Data structuresRust patterns guardMacro implementation of RFC 1303: a guard-let-else statement a la Swift655,645MIT/Apache-2.0Rust patterns byte-stringsRust byte strings manipulation, for a better and safer C FFI634,542Zlib OR MIT OR Apache-2.0API bindingsRust patterns nonanyInteger types with customizable niche values605,017MIT OR Apache-2.0No standard libraryRust patterns defer-liteA lightweight high-performance implementation of Go's defer statement.604,692MITNo standard libraryRust patterns easy-errorSimple error utilities604,678MITRust patterns velcroConvenience macros for initializing vectors, hash maps and other Rust collections.603,534Unlicense OR MITData structuresRust patterns join-lazy-fmtLazy `separator.join(iterable)` method and `lazy_format!` for Rust602,548MITRust patterns metastruct_macroAbstractions for iterating and mapping over struct fields (proc macro crate)594,307Apache-2.0Rust patterns metastructAbstractions for iterating and mapping over struct fields593,735Apache-2.0Rust patterns iter-enum#[derive(Iterator, DoubleEndedIterator, ExactSizeIterator, Extend)] for enums.589,357Apache-2.0 OR MITNo standard libraryNo standard library::No dynamic allocation velcro_macrosProcedural macros used by the `velcro` crate. See `velcro` for documentation. It is not advised to depend on this crate…584,150Unlicense OR MITData structuresRust patterns velcro_coreCore dependencies used by the `velcro` crate. See `velcro` for documentation. It is not advised to depend on this crate…583,038Unlicense OR MITData structuresRust patterns partiallyProvides the Partial trait, and an optional macro to mirror a struct, wrapping each field in an Option570,816MIT OR Apache-2.0Rust patterns partially_deriveMacros for the partially crate570,765MIT OR Apache-2.0Rust patterns async-stdinAsynchronously read from stdin566,362MITAsynchronousCommand-line interface oneshot-fused-workaroundFused wrapper for futures::channel::oneshot562,219MIT OR Apache-2.0Rust patterns facet-coreCore reflection traits and types for the facet ecosystem - provides the Facet trait, Shape metadata, and type-erased pointers522,541MIT OR Apache-2.0Development toolsRust patterns facetReflection for Rust: introspect types at compile time with metadata for serialization, pretty-printing, CLIs, and more522,300MIT OR Apache-2.0Development toolsEncoding sugarsAn useful collection of macros to make tasks easier.501,783non-standardRust patterns counted-arrayMacro for declaring fixed-size arrays without counting elements by hand. Supports lazy_static.500,336MITRust patterns elainSet a type's minimum alignment with const generics.499,584MIT OR Apache-2.0No standard libraryRust patterns attr_aliasReduce attribute repetition with aliases494,761MIT OR Apache-2.0Development tools::Build UtilsNo standard library::No dynamic allocation socketpairCross-platform socketpair functionality487,128Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MITRust patterns const_fn_assertAssertions for const functions.480,166MITDevelopment tools::TestingNo standard library kameoFault-tolerant Async Actors Built on Tokio478,479MIT OR Apache-2.0AsynchronousConcurrency facet-macrosDerive macro for the Facet trait - proc macro powered by unsynn for compile-time type introspection477,837MIT OR Apache-2.0Development toolsRust patterns init_withHelper trait to initilize an array with a function476,712UnlicenseRust patterns error-graphAllows non-fatal errors in a tree of subfunctions to easily be collected by a caller476,634MITRust patterns futures-await-testAsync test support for Rust through a procedural macro. This crate defines the `#[async_test]` attribute to make writing tests…456,935MITAsynchronousRust patterns databakeTrait that lets structs represent themselves as (const) Rust expressions456,056Unicode-3.0Development tools::Build UtilsDevelopment tools::Procedural macro helpers concurrent-mapa lock-free linearizable B+ tree455,484MIT OR Apache-2.0ConcurrencyData structures dyn-eqTest equality between trait objects452,429MPL-2.0No standard libraryNo standard library::No dynamic allocation enoughMinimal cooperative cancellation trait for long-running operations450,747MIT OR Apache-2.0ConcurrencyNo standard library databake-deriveCustom derive for the databake crate450,106Unicode-3.0Development tools::Build UtilsDevelopment tools::Procedural macro helpers futures-await-test-macroHelper crate for futures-await-test.441,056MITAsynchronousRust patterns whereatLightweight error location tracking with small sizeof and no_std support439,500MIT OR Apache-2.0No standard libraryRust patterns ebrsimple epoch-based reclamation with low cacheline ping-pong413,255MIT OR Apache-2.0ConcurrencyData structures metainfoTransmissing metainfo across components.412,317MIT OR Apache-2.0AccessibilityConcurrency bounded-staticDefines the ToBoundedStatic and IntoBoundedStatic traits408,972Apache-2.0Data structuresMemory management qcellStatically-checked alternatives to RefCell and RwLock406,771MIT/Apache-2.0Data structuresMemory management lsetData types describing linear sets403,633Apache-2.0Development toolsRust patterns format-bufDrop-in replacement for format! macro, which can write to existing buffer400,899MIT OR Apache-2.0Rust patterns bip21Rust-idiomatic, compliant, flexible and performant BIP21 crate.397,515MITNFACryptography::CryptocurrenciesEncoding meticulousResult extension to add more meaning to unwrapping390,080MIT/Apache-2.0Rust patterns next-genSafe generators on stable Rust.378,421Zlib OR MIT OR Apache-2.0AsynchronousConcurrency bounded-static-deriveMacro to derive ToBoundedStatic and IntoBoundedStatic traits377,055Apache-2.0Data structuresMemory management arch-intosafe type conversions between pointer-sized types (usize/isize) and types with fixed size374,154MIT/Apache-2.0Rust patterns gazeboA collection of well-tested utilities370,319MIT OR Apache-2.0Rust patterns as-dyn-traitAn attribute macro that generates methods for retrieving supertraits from trait-objects (upcasting).368,742UnlicenseRust patterns require_unsafe_in_bodyMake `unsafe fn` still require `unsafe` blocks in the function's body363,233MITRust patterns gazebo_deriveDerive macros for the Gazebo library358,629MIT OR Apache-2.0Rust patterns gat-lending-iteratorA library for iterators who's items can [mutably] reference the iterator.358,078MITAlgorithmsRust patterns qp-trieAn idiomatic and fast QP-trie implementation in pure Rust, written with an emphasis on safety.355,606MPL-2.0Data structuresNo standard library ref_thread_localA macro for declaring thread-local `static`s like using both of `lazy_static!` and `RefCell`354,513MITMemory managementRust patterns cfg-or-panicReplace function bodies with `unimplemented!()` when condition is not met.354,152Apache-2.0Development tools::Build UtilsRust patterns lazy-static-includeThis crate provides `lazy_static_include_bytes` and `lazy_static_include_str` macros to replace `include_bytes` and `include_str`…354,009MITMemory managementRust patterns miden-mietteFancy diagnostic reporting library and protocol for us mere mortals who aren't compiler hackers.348,729Apache-2.0No standard libraryRust patterns bstringifystringify! that yields byte string literals instead348,026Zlib OR MIT OR Apache-2.0Rust patterns nbytesRust compile-time evaluation of byte unit conversions340,323Apache-2.0Development toolsRust patterns