Rust patterns
Provides a series of code Design patterns to help Rust developers efficiently solve common programming problems.
提供一系列代码设计模式,帮助Rust开发者高效解决常见编程问题。
- Bitflags : Create a safe type that can represent a set of bit flags through macro definition, often used to represent a set of boolean values.
Bitflags :创建一个安全类型,可以通过宏定义表示一组位标志,通常用于表示一组布尔值。 - Thiserror : A handy library for deriving Error implementations for error types in Rust to simplify error handling.
Thiserror :一个方便的库,用于派生 Rust 中错误类型的 Error 实现,以简化错误处理。 - Miette : A library that emphasizes User Experience and provides beautiful error reporting and advanced diagnostics.
Miette:一个强调用户体验并提供漂亮的错误报告和高级诊断的库。 - Itertools : Provides a range of additional iterator adapters, methods, and macros that extend the iterator functionality in the Rust standard library.
Itertools :提供一系列附加的迭代器适配器、方法和宏,用于扩展 Rust 标准库中的迭代器功能。 - once_cell Provides support for global and local lazy loading variables, allowing immutable access after a single initialization.
Once_cell 提供对全局和局部延迟加载变量的支持,允许在单次初始化后进行不可变访问。 - Eyre : Provides a highly flexible way of handling and reporting errors, allowing developers to define the style and context of error reports.
Eyre:提供高度灵活的处理和报告错误的方式,允许开发人员定义错误报告的样式和上下文。 - Ordered — float : Provides a floating-point wrapper that allows unstable floating-point numbers to be fully sorted for use in collection types and other situations.
Ordered — float :提供浮点包装器,允许对不稳定的浮点数进行完全排序,以便在集合类型和其他情况下使用。 - Bytes : A library focused on byte sequence operations to simplify the handling of byte slices such as network buffering.
Bytes:一个专注于字节序列操作的库,以简化字节片的处理,例如网络缓冲。 - Indoc : A macro used to embed appropriately indented multiline string literals in source code for improved readability.
Indoc :用于在源代码中嵌入适当缩进的多行字符串文字以提高可读性的宏。 - Volatile : Provides encapsulation of raw pointers, allowing safer volatile read and write operations to memory.
Volatile :提供原始指针的封装,允许对内存进行更安全的易失性读写操作。 - DYN — hash : Provides a hash feature that can manipulate dynamically (dyn) -typed objects to build a generic hash collection that can accept any object that implements the feature.
DYN — hash :提供哈希功能,可以操作动态 (dyn) 类型的对象来构建通用哈希集合,该集合可以接受实现该功能的任何对象。 - Glib : The binding of the GLib library in the Rust language allows developers to use the underlying operations and structures provided by GLib and related libraries in Rust.
Glib :Rust 语言中 GLib 库的绑定,允许开发者在 Rust 中使用 GLib 和相关库提供的底层操作和结构。 - Const-type-layout : By deriving macros relative to the native Rust type description (TypeLayout), it realizes the constant representation of type layout information, which is conducive to checking the structure layout when compiling.
const-type-layout :通过派生相对于 Rust 原生类型描述(TypeLayout)的宏,实现类型布局信息的常量表示,有利于编译时检查结构布局。 - Rustler : A framework that allows Rust code to be integrated into the Erlang virtual machine as an external function interface.
Rustler :一个允许 Rust 代码作为外部函数接口集成到 Erlang 虚拟机中的框架。 - Rustrix : Focuses on linear algebra, especially matrix operations, providing operation macros and basic functions to manipulate matrices.
Rustrix:专注于线性代数,特别是矩阵运算,提供操作宏和基本函数来操作矩阵。 - Cel-interpreter : An interpreter that implements the Common Expression Language (CEL) to execute CEL expressions, commonly found in policy and rules engines.
Cel-interpreter :实现通用表达式语言(CEL)以执行 CEL 表达式的解释器,常见于策略和规则引擎中。
Network programming
For example, network protocols such as FTP, HTTP, SSH, or lower-level TCP or UDP.
例如,FTP、HTTP、SSH 等网络协议或较低级别的 TCP 或 UDP。
- Socket2 : Highly configurable handling of network sockets for flexibility in underlying network programming.
Socket2:高度可配置的网络套接字处理,以实现底层网络编程的灵活性。 - IPNet : Provides data types for handling network addresses and subnets for IP network computing.
IPNet:提供用于处理IP网络计算的网络地址和子网的数据类型。 - Rustls-native-certs : Allows rustls to use platform-native certificate stores to support TLS encrypted communications.
Rustls-native-certs :允许 rustls 使用平台本机证书存储来支持 TLS 加密通信。 - Native-tls : Provides a cross-platform TLS API that encapsulates native TLS implementations for various operating systes.
Native-tls :提供跨平台的 TLS API,封装了各种操作系统的本机 TLS 实现。 - Async-graphql : A powerful, type-safe GraphQL server implementation that supports asynchronous processing.
Async-graphql:一个强大的、类型安全的 GraphQL 服务器实现,支持异步处理。 - Tower : Provides an abstraction layer and Middleware for building network services, designed to simplify the construction and composition of network services.
Tower:提供构建网络服务的抽象层和中间件,旨在简化网络服务的构建和组合。 - Aws-sdk-s3 : The official AWS SDK Client for Amazon Simple Storage Service (Amazon S3) for Rust.
Aws-sdk-s3 :适用于 Rust 的 Amazon Simple Storage Service (Amazon S3) 的官方 AWS 开发工具包客户端。 - Quinn : Based on the Rust QUIC (Fast UDP Internet Connection) protocol implementation, supporting efficient and reliable transmission.
Quinn :基于 Rust QUIC(快速 UDP Internet 连接)协议实现,支持高效可靠的传输。 - port_check Use to check if the local port is available or if the remote port is connected.
port_check 用于检查本地端口是否可用或远程端口是否已连接。 - Rqbit : bittorrent Client and server written in Rust, feature-rich and efficient.
Rqbit :用 Rust 编写的 bittorrent 客户端和服务器,功能丰富且高效。 - Tokio-modbus : An asynchronous Modbus library based on the Tokio runtime, suitable for building real-time communication applications.
Tokio-modbus:基于Tokio运行时的异步Modbus库,适合构建实时通信应用程序。 - cidr_calc A library that facilitates the calculation of CIDR (Classless Inter-Domain Routing) related subnets and IP address ranges.
cidr_calc 一个有助于计算 CIDR(无类域间路由)相关子网和 IP 地址范围的库。 - azure_devops_rust_api Rust API library for accessing Azure DevOps services, allowing integration and automation of workflows.
azure_devops_rust_api 用于访问 Azure DevOps 服务的 Rust API 库,允许工作流的集成和自动化。
Data structures 数据结构
Rust data structures implemented for specific purposes.
Rust 数据结构为特定目的而实现。
- HashBrown : An efficient hash table implementation based on Google’s SwissTable design that provides fast find, insert, and delete operations.
HashBrown:基于 Google SwissTable 设计的高效哈希表实现,提供快速查找、插入和删除操作。 - Bitvec : allows you to manipulate memory in units of individual bits, used to create compact bit arrays and bit fields.
Bitvec :允许您以单个位为单位操作内存,用于创建紧凑的位数组和位字段。 - Phf : Statically generated perfect hash function library that allows efficient Look-up tables to be created at compile time.
Phf:静态生成的完美哈希函数库,允许在编译时创建高效的查找表。 - Indexmap : a hash table mapping and collection that guarantees insertion order, combining the advantages of fast insertion and fast iteration.
Indexmap :保证插入顺序的哈希表映射和集合,结合了快速插入和快速迭代的优点。 - Half : Provides a Rust implementation of half-precision floating-point numbers (f16 and bf16) for lean floating-point calculations.
Half :提供半精度浮点数(f16 和 bf16)的 Rust 实现,用于精简浮点计算。 - Num : Collects various number types and related characteristics (Traits), including integers, floating-point numbers, rational numbers, and large integers.
Num :收集各种数字类型和相关特征(Traits),包括整数、浮点数、有理数和大整数。 - Ropey : A high-performance Rust text rope data structure designed for editing and other text manipulation.
Ropey:一种高性能 Rust 文本绳数据结构,设计用于编辑和其他文本操作。 - Priority-queue : Implemented the priority queue data structure, based on the binary heap algorithm, supporting dynamic element priority changes.
Priority-queue :实现了优先级队列数据结构,基于二叉堆算法,支持动态元素优先级变化。 - Smallvec : a vector that implements small capacity optimization, storing a small number of elements on the stack to avoid heap allocation.
Smallvec :实现小容量优化的向量,在堆栈上存储少量元素以避免堆分配。 - Fixedbitset : A simple and efficient implementation of bitsets for processing fixed-size bitsets.
固定位集:用于处理固定大小位集的简单有效的位集实现。 - YRS : Rust implementation based on Yjs CRDT algorithm, supporting synchronous collaborative editing and other functional requirements.
YRS :基于 Yjs CRDT 算法的 Rust 实现,支持同步协同编辑等功能需求。 - Char-list : A collection of character lists that provides string-like but immutable properties.
Char-list :字符列表的集合,提供类似字符串但不可变的属性。 - Kbs-types : Defines serializable and deserializable Rust types, mainly used in the KBS system.
Kbs-types :定义可序列化和可反序列化的 Rust 类型,主要用于 KBS 系统。 - Any-range : Supports enumeration of various Range types in the Rust standard library, giving greater flexibility in parsing and operating range.
Any-range :支持 Rust 标准库中各种 Range 类型的枚举,在解析和操作范围方面给予更大的灵活性。 - more_collections Provides a range of additional collection types to complement the collections module in the standard library.
more_collections 提供一系列附加集合类型来补充标准库中的集合模块。 - Xot : A comprehensive Rust XML processing library that supports building and manipulating XML tree structures.
Xot:一个全面的 Rust XML 处理库,支持构建和操作 XML 树结构。 - Bao-tree : Combined with the BLAKE3 hash algorithm, provides the ability to verify the entire stream block by block instead of all at once.
Bao-tree:与 BLAKE3 哈希算法相结合,提供了逐块而不是一次性验证整个流的能力。
Algorithm 算法
Including core algorithms such as hashing, sorting, and searching.
包括哈希、排序、搜索等核心算法。
- Rand : A comprehensive random number generation library for the Rust language, including various random number generators as well as randomness features and distributions.
Rand:Rust 语言的综合随机数生成库,包括各种随机数生成器以及随机性特征和分布。 - CRC : Provides the implementation of CRC (Cyclic Redundancy Check) algorithm, suitable for various CRC standards and bit widths.
CRC :提供CRC(循环冗余校验)算法的实现,适用于各种CRC标准和位宽。 - Fastrand : a random number generator designed with performance as the main goal.
Fastrand:以性能为主要目标而设计的随机数生成器。 - Strsim : Contains multiple algorithms to calculate and compare the similarity and distance of strings.
Strsim :包含多种算法来计算和比较字符串的相似度和距离。 - Twox-hash : High-performance hash algorithm library, based on XXHash algorithm, suitable for fast data fingerprint or hash table scenarios.
Twox-hash :高性能哈希算法库,基于XXHash算法,适用于快速数据指纹或哈希表场景。 - Bytecount : E