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 , byteorder , hex , json5 , nom , regex , serde , serde_json , toml |
time | chrono , jiff |
random numbers | rand , rand_chacha , rand_pcg |
cryptography | blake3 , sha2 |
parallelism | crossbeam , rayon |
asyncronous 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 |
terminal / CLI | clap , ctrlc , termcolor , rustyline |
system / OS | 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. - 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
- Easy 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.byteorder
- Big-endian and little-endian encoding.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 hexidecimal 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.proptest
- Testing over generated inputs, ala QuickCheck.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-rustlibs-std
.
Β§Crates in rmx-profile-std
clap
- Command line parsing.env_logger
- A basic logger to use with thelog
crate.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.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-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-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-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-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.4"
rmx.features = [
"rmx-profile-max",
]
Or if using a workspace, in your workspace Cargo.toml
[dependencies]
rmx.version = "0.0.4"
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.4"
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§
- A fast and DOS-resistent hash function, for use in
HashMap
s. - The Rust core allocation and collections library
- Easy error handling.
- Web application framework based on
tokio
. - Callstack backtraces on demand.
- Base-64 encoding and decoding.
- Generate Rust bindings to C and C++ libraries.
- Types in which the bits are individually addressable.
- The BLAKE3 cryptographic hash function.
- Big-endian and little-endian encoding.
- A basic cross-platform C compiler driver.
- A macro for writing conditional compilation as
if
/else
blocks. - Dates and time (legacy).
- Command line parsing.
- The Rust Core Library
- Concurrency tools to supplement
std::sync
, including fast channels. - Simple handling of CTRL-C for CLI programs.
- C++ bridge runtime support; paired with
cxx_build
. - C++ bridge generator; paired with
cxx
. derive
for more standard traits.- A basic logger to use with the
log
crate. - A macro for defining extension methods to external types.
- Additional tidbits defined by
rmx
. - Abstractions for asynchronous programming.
- Encoding and decoding hexidecimal strings.
- Shared definitions related to the HTTP protocol.
- HTTP, versions 1 and 2.
- Additional methods for iterators.
- Dates and time.
- JSON5, a superset of JSON with expanded syntax.
- Bindings to the C standard library.
- A simple logging framework.
- MIME media types.
- An efficient parser combinator.
- Arbitrary-sized integers.
- Get the number of CPUS on a machine.
- Conversions between numbers and enums.
- The
rmx
prelude. - A support library for macro authors when defining new macros.
- A preferred wrapper around the standard
proc_macro
crate. - Testing over generated inputs, ala QuickCheck.
- The
quote!
macro for turning code blocks into source tokens. - Random number generators.
- The ChaCha cryptographically-secure random number generators.
- The PCG non-cryptographically-secure random number generators.
- Parallel iterators and other parallel processing tools.
- Regular expressions.
- Simple HTTP requests, synchronous and asynchronous.
- Command-line input reading with history.
- The software versioning standard used by Rust
- The standard Rust serialization framework.
- JSON serialization / deserialization with
serde
. - The SHA2 cryptographic hash functions.
- Low-level network socket programming beyond
std::net
. - Compile-time assertions about constants, types, etc.
- The Rust Standard Library
- A Rust parser used by procedural macros.
- Temporary files and directories.
- A text template engine based on Jinja2.
- Cross-platform library for writing colored output to the terminal.
- Tools for defining custom error types.
- An async task runtime and I/O library.
- TOML serialization / deserialization with
serde
. - Splitting strings on grapheme cluster, word, and sentence boundaries.
- URL parsing and data structures.
- Efficient directory traversal.
- A Swiss-army knife for writing shell-style scripts in Rust.
Macros§
- Like βunimplementedβ but shorter to type.