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