Expand description
A collection of Rust crates.
π§ WARNING: Do not use this project. It is neither stable nor supported. π§
This crate documents and reexports selected high-quality Rust crates suitable for many Rust programs. Through the organization of its Cargo features into profiles and ecosystem features, with consistent descriptions of individual crates, it is a guide to the Rust crate ecosystem. It can be read as reference documentation or imported through a Cargo dependency as a βbatteries includedβ supercrate.
Category | Crates |
---|---|
error handling and debugging | anyhow , backtrace , env_logger , log , thiserror |
collections | ahash , bitflags , bytes , itertools |
numerics | num_bigint |
encoding, serialization, parsing | base64 , flate2 , hex , json5 , nom , regex , serde , serde_json , toml |
time | chrono , jiff |
random numbers | rand , rand_chacha , rand_pcg |
cryptography | blake3 , sha2 |
parallelism | crossbeam , rayon |
asynchronous I/O | futures , tokio |
networking and web | axum , http , hyper , mime , reqwest , socket2 , tera , tower , url |
text / unicode | unicode_segmentation |
convenience macros | cfg-if , derive_more , extension-trait , num_enum , powerletters |
terminal / CLI | clap , ctrlc , termcolor , rustyline |
system / OS | glob , num_cpus , tempfile , walkdir , xshell |
testing | proptest , static_assertions |
FFI / interop | libc , bindgen , cc , cxx , cxx-build |
build scripts | β¦ |
deployment and software lifecycle | semver |
procedural macros | proc-macro2 , quote , syn |
- Profiles.
rustmax
organizes crates into profiles, which correspond to common target environments and application types.- π Profile:
rmx-profile-no-std
- π Profile:
rmx-profile-std
- π Profile:
rmx-profile-wasm
- π Profile:
rmx-profile-net
- π Profile:
rmx-profile-cli
- π Profile:
rmx-profile-build-script
- π Profile:
rmx-profile-proc-macro
- π Profile:
rmx-profile-full
- π Profile:
rmx-profile-max
- π Profile:
rmx-profile-max-nightly
- π Profile:
- Ecosystem features.
rustmax
identifies Cargo features common across many crates. - Rust standard libraries.
rustmax
re-exports the standard Rust libraries for convenience. - Using
rustmax
as a library rustmax
crate API docs
Β§Profiles
rustmax
organizes crates into profiles,
which correspond to common target environments and application types.
By default no profile is enabled and no crates are exported.
Β§π Profile: rmx-profile-no-std
This profile includes crates that do not require Rust std
.
It allows use of the Rust allocator,
and enables allocator-related features of its crates.
All crates in this profile are also in rmx-profile-std
.
π‘ This profile also enables rmx-feature-no-std
.
π‘ This profile also enables rmx-rustlibs-no-std
.
Β§Crates in rmx-profile-no-std
ahash
- A fast and DOS-resistent hash function, for use inHashMap
s.anyhow
- Flexible error handling.backtrace
- Callstack backtraces on demand.base64
- Base-64 encoding and decoding.bitflags
- Types in which the bits are individually addressable.blake3
- The BLAKE3 cryptographic hash function.bytes
- Abstractions for working with byte buffers:Bytes
,Buf
, andBufMut
.cfg-if
- A macro for writing conditional compilation asif
/else
blocks.chrono
- Dates and time (legacy).crossbeam
- Concurrency tools to supplementstd::sync
, including fast channels.derive_more
-derive
for more standard traits.extension-trait
- A macro for defining extension methods to external types.futures
- Abstractions for asynchronous programming.hex
- Encoding and decoding hexadecimal strings.itertools
- Additional methods for iterators.jiff
- Dates and time.libc
- Bindings to the C standard library.log
- A simple logging framework.nom
- An efficient parser combinator.num_bigint
- Arbitrary-sized integers.num_enum
- Conversions between numbers and enums.rand
- Random number generators.rand_chacha
- The ChaCha cryptographically-secure random number generators.rand_pcg
- The PCG non-cryptographically-secure random number generators.semver
- The software versioning standard used by Rust.serde
- The standard Rust serialization framework.serde_json
- JSON serialization / deserialization withserde
.sha2
- The SHA2 cryptographic hash functions.static_assertions
- Compile-time assertions about constants, types, etc.toml
- TOML serialization / deserialization withserde
.
Β§π Profile: rmx-profile-std
This profile depends on the Rust standard library,
and includes crates that require the Rust standard library,
in addition to the crates provided by rmx-profile-no-std
.
π‘ This profile also enables rmx-feature-std
.
π‘ This profile also enables rmx-feature-default
.
π‘ This profile also enables rmx-feature-more
.
π‘ This profile also enables rmx-feature-derive
.
π‘ This profile also enables rmx-feature-serde
.
π‘ This profile also enables rmx-rustlibs-std
.
Β§Crates in rmx-profile-std
clap
- Command line parsing.env_logger
- A basic logger to use with thelog
crate.flate2
- Deflate, gzip, and zlib compression and decompression.glob
- Unix shell style pattern matching for paths.json5
- JSON5, a superset of JSON with expanded syntax.num_cpus
- Get the number of CPUS on a machine.proptest
- Testing over generated inputs, ala QuickCheck.rayon
- Parallel iterators and other parallel processing tools.regex
- Regular expressions.tempfile
- Temporary files and directories.tera
- A text template engine based on Jinja2.thiserror
- Tools for defining custom error types.unicode-segmentation
- Splitting strings on grapheme cluster, word, and sentence boundaries.walkdir
- Efficient directory traversal.xshell
- A Swiss-army knife for writing shell-style scripts in Rust.
Β§π Profile: rmx-profile-wasm
This profile is designed for WebAssembly (WASM) targets.
It includes all crates from rmx-profile-no-std
,
plus additional crates that are compatible with WASM environments.
This profile uses WASM-specific variants of ecosystem features that exclude features incompatible with WASM environments, such as OS-specific threading APIs and file system operations that require native OS support.
π‘ This profile also enables rmx-rustlibs-std
.
π‘ This profile also enables rmx-feature-std-wasm
.
π‘ This profile also enables rmx-feature-default-wasm
.
π‘ This profile also enables rmx-feature-more-wasm
.
π‘ This profile also enables rmx-feature-derive
.
π‘ This profile also enables rmx-feature-serde
.
Β§Crates in rmx-profile-wasm
All crates from rmx-profile-no-std
, plus:
clap
- Command line parsing.env_logger
- A basic logger to use with thelog
crate.flate2
- Deflate, gzip, and zlib compression and decompression.glob
- Unix shell style pattern matching for paths.json5
- JSON5, a superset of JSON with expanded syntax.num_cpus
- Get the number of CPUS on a machine.rayon
- Parallel iterators and other parallel processing tools.regex
- Regular expressions.tempfile
- Temporary files and directories.thiserror
- Tools for defining custom error types.unicode-segmentation
- Splitting strings on grapheme cluster, word, and sentence boundaries.
Note: Some crates from rmx-profile-std
are not included
because they require native OS features unavailable in WASM environments:
proptest
, tera
, walkdir
, xshell
.
Β§π Profile: rmx-profile-net
Adds networking crates,
including the tokio
async runtime.
Not that this profile does not enable tokio
features
for other crates; to enable tokio
features
apply the rmx-feature-tokio
feature.
π‘ This profile also enables rmx-profile-std
.
Β§Crates in rmx-profile-net
axum
- Web application framework based ontokio
.http
- Shared definitions related to the HTTP protocol.hyper
- HTTP, versions 1 and 2.mime
- MIME media types.reqwest
- Simple HTTP requests, synchronous and asynchronous.socket2
- Low-level network socket programming beyondstd::net
.tokio
- An async task runtime and I/O library.tower
- Service request/response abstraction (HTTP middleware) fortokio
andaxum
.url
- URL parsing and data structures.
Β§π Profile: rmx-profile-cli
Crates for building commandline interfaces.
π‘ This profile also enables rmx-profile-std
.
Β§Crates in rmx-profile-cli
ctrlc
- Simple handling of Ctrl-C for CLI programs.termcolor
- Cross-platform library for writing colored output to the terminal.rustyline
- Command-line input reading with history.
Β§π Profile: rmx-profile-build-script
Crates for writing Rust build scripts.
π‘ This profile also enables rmx-profile-std
.
Β§Crates in rmx-profile-build-script
bindgen
- Generate Rust bindings to C and C++ libraries.cc
- A basic cross-platform C/C++ compiler driver.cxx
- C++ bridge runtime support; paired withcxx_build
.cxx-build
- C++ bridge generator; paired withcxx
.
Β§π Profile: rmx-profile-proc-macro
Crates for writing Rust procedural macros.
π‘ This profile also enables rmx-profile-std
.
π‘ This profile also enables rmx-rustlibs-proc-macro
.
Β§Crates in rmx-profile-proc-macro
proc-macro2
- A preferred wrapper around the standardproc_macro
crate.quote
- Thequote!
macro for turning code blocks into source tokens.syn
- A Rust parser used by procedural macros.
Β§π Profile: rmx-profile-full
This profile simply enables all previous profiles.
π‘ This profile also enables rmx-profile-std
.
π‘ This profile also enables rmx-profile-net
.
π‘ This profile also enables rmx-profile-cli
.
π‘ This profile also enables rmx-profile-build-script
.
π‘ This profile also enables rmx-profile-proc-macro
.
Β§π Profile: rmx-profile-max
rustmax
with all features (that donβt require nightly).
π‘ This profile also enables rmx-profile-full
.
π‘ This profile also enables rmx-feature-derive
.
π‘ This profile also enables rmx-feature-serde
.
π‘ This profile also enables rmx-feature-backtrace
.
π‘ This profile also enables rmx-feature-tokio
.
Β§π Profile: rmx-profile-max-nightly
rustmax
with all features (including nightly).
π‘ This profile also enables rmx-profile-max
.
π‘ This profile also enables rmx-feature-nightly
.
Β§Ecosystem features
rustmax
identifies Cargo features common across many crates.
Β§β² Feature: rmx-feature-no-std
This feature is enabled by rmx-profile-no-std
.
It does not typically need to be set manually.
It enables few features, particularly enabling allocator support for no-std crates that can be compiled without.
Β§β² Feature: rmx-feature-std
This feature is enabled by rmx-profile-std
.
It does not typically need to be set manually.
It enables the βstdβ feature of crates and other default features that require the standard library.
Β§β² Feature: rmx-feature-std-wasm
This feature is enabled by rmx-profile-wasm
.
It does not typically need to be set manually.
Similar to rmx-feature-std
, but excludes features
that are incompatible with WebAssembly targets,
such as those requiring threading or OS-specific APIs.
Β§β² Feature: rmx-feature-default
This feature is enabled by rmx-profile-std
.
It does not typically need to be set manually.
It enables the βdefaultβ feature of crates.
Β§β² Feature: rmx-feature-default-wasm
This feature is enabled by rmx-profile-wasm
.
It does not typically need to be set manually.
Similar to rmx-feature-default
, but uses WASM-compatible
default features where necessary.
Β§β² Feature: rmx-feature-more
This feature is enabled by rmx-profile-std
.
It does not typically need to be set manually.
This activates extra crate features for convenience that the crates themselves do not typically activate by default.
Β§β² Feature: rmx-feature-more-wasm
This feature is enabled by rmx-profile-wasm
.
It does not typically need to be set manually.
Similar to rmx-feature-more
, but excludes features
that are incompatible with WebAssembly targets,
such as blocking I/O and threading.
Β§β² Feature: rmx-feature-derive
Enables derive macros of crates where it is optional, typically with a feature named βderiveβ.
Β§β² Feature: rmx-feature-serde
Enables serde
support for crates where it is optional,
typically with a feature named βserdeβ.
Β§β² Feature: rmx-feature-backtrace
Enables backtrace support for crates where it is optional, typically with a feature named βbacktraceβ.
This feature is necessary for backtrace support in anyhow
.
This feature also enables rmx-feature-std
.
Β§β² Feature: rmx-feature-tokio
Enables tokio
support for crates where it is optional,
typically with a feature named βtokioβ.
Β§β²Feature: rmx-feature-nightly
Enables features that only compile with the Rust [nightly compiler], typically with a feature named βnightlyβ.
Β§Rust standard libraries
rustmax
re-exports the standard Rust libraries for convenience.
Β§π Rustlib: rmx-rustlibs-no-std
Β§π Rustlib: rmx-rustlibs-alloc
Β§π Rustlib: rmx-rustlibs-std
Β§π Rustlib: rmx-rustlibs-proc-macro
Β§Using rustmax
as a library.
In your manifest Cargo.toml
:
[dependencies]
rmx.package = "rustmax"
rmx.version = "0.0.5"
rmx.features = [
"rmx-profile-max",
]
Or if using a workspace, in your workspace Cargo.toml
[dependencies]
rmx.version = "0.0.5"
rmx.features = [
"rmx-profile-max",
]
And in your crateβs Cargo.toml
[dependencies]
rmx.workspace = true
Β§rustmax
and cargo features
todo
The main way of configuring the rustmax
crates is by enabling
the appropriate profile cargo features.
rustmax
enables no features by default,
and reexports no crates;
but for most uses people will want to enable rmx-profile-std
.
This feature augments the Rust std
library with crates
that are widely used with a variety of Rust programs,
as well as minor helpers missing from the standard library.
[dependencies]
rmx.package = "rustmax"
rmx.version = "0.0.5"
rmx.features = [
"rmx-profile-max",
]
Β§Crate reexports
The crates of rustmax
are all reexported as modules from the rustmax
crate.
use rmx::rand::Rng;
These modules should generally behave the same as the corresponding crates,
with exceptions noted in βKnown Bugsβ.
These modules have have rustmax
-specific module-level documentation,
with a short description and motivation, an example,
and relevant links, including to the original crate-level documentation.
These modules are only defined when their crate is configured
through cargo features like rmx-profile-std
.
Β§The rustmax
prelude
Β§The extras
module
Β§Known bugs
serde
derive only works if theserde
crate is an explicit dependency.derive_more
derives only works if thederive_more
crate is an explicit dependency.
ModulesΒ§
- ahash
- A fast and DOS-resistent hash function, for use in
HashMap
s. - alloc
- The Rust core allocation and collections library
- anyhow
- Flexible error handling.
- axum
- Web application framework based on
tokio
. - backtrace
- Callstack backtraces on demand.
- base64
- Base64 encoding and decoding.
- bindgen
- Generate Rust bindings to C and C++ libraries.
- bitflags
- Types in which the bits are individually addressable.
- blake3
- The BLAKE3 cryptographic hash function.
- bytes
- Efficient byte buffer management.
- cc
- A basic cross-platform C compiler driver.
- cfg_if
- A macro for writing conditional compilation as
if
/else
blocks. - chrono
- Date and time library.
- clap
- Command line argument parsing.
- core
- The Rust Core Library
- crossbeam
- Concurrency tools to supplement
std::sync
, including fast channels. - ctrlc
- Simple handling of CTRL-C for CLI programs.
- cxx
- C++ bridge runtime support; paired with
cxx_build
. - cxx_
build - C++ bridge generator; paired with
cxx
. - derive_
more - Derive implementations for common traits.
- env_
logger - A simple logger that can be configured via environment variables.
- extension_
trait - A macro for defining extension methods to external types.
- extras
- Additional tidbits defined by
rmx
. - flate2
- Deflate, gzip, and zlib compression.
- futures
- Async programming primitives and utilities.
- glob
- Unix shell style pattern matching.
- hex
- Hexadecimal encoding and decoding.
- http
- Shared definitions related to the HTTP protocol.
- hyper
- HTTP, versions 1 and 2.
- itertools
- Extra iterator methods and utilities.
- jiff
- Modern date and time library.
- json5
- JSON5, a superset of JSON with expanded syntax.
- libc
- Bindings to the C standard library.
- log
- A lightweight logging facade for Rust.
- mime
- MIME type parsing and manipulation.
- nom
- Parser combinator library for building zero-copy parsers.
- num_
bigint - Arbitrary precision integers.
- num_
cpus - Get the number of CPUS on a machine.
- num_
enum - Type-safe conversions between enums and primitive numbers.
- powerletters
- Concise single-letter methods for common operations.
- prelude
- The
rmx
prelude. - proc_
macro - A support library for macro authors when defining new macros.
- proc_
macro2 - A preferred wrapper around the standard
proc_macro
crate. - proptest
- Property-based testing framework for Rust.
- quote
- The
quote!
macro for turning code blocks into source tokens. - rand
- Random number generation.
- rand_
chacha - The ChaCha cryptographically-secure random number generators.
- rand_
pcg - The PCG non-cryptographically-secure random number generators.
- rayon
- Data parallelism library for Rust.
- regex
- Regular expression engine with support for Unicode.
- reqwest
- Simple HTTP requests, synchronous and asynchronous.
- rustyline
- Command-line input reading with history.
- semver
- Semantic version parsing and comparison.
- serde
- Serialization and deserialization framework.
- serde_
json - JSON serialization and deserialization.
- sha2
- The SHA-2 cryptographic hash functions.
- socket2
- Low-level network socket programming beyond
std::net
. - static_
assertions - Compile-time assertions about constants, types, and more.
- std
- The Rust Standard Library
- syn
- A Rust parser used by procedural macros.
- tempfile
- Temporary files and directories with automatic cleanup.
- tera
- A text template engine based on Jinja2.
- termcolor
- Cross-platform library for writing colored output to the terminal.
- thiserror
- Tools for defining custom error types.
- tokio
- Asynchronous runtime for writing reliable network applications.
- toml
- TOML parsing and serialization.
- tower
- Service request/response abstraction (HTTP middleware)
for
tokio
andaxum
. - unicode_
segmentation - Splitting strings on grapheme cluster, word, and sentence boundaries.
- url
- URL parsing and manipulation.
- walkdir
- Efficient directory traversal.
- xshell
- A Swiss-army knife for writing shell-style scripts in Rust.
MacrosΒ§
- bug
- Like βunimplementedβ but shorter to type.