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