Cargo Features

[dependencies]
const-hex = { version = "1.14.0", default-features = false, features = ["std", "alloc", "core-error", "serde", "hex", "force-generic", "portable-simd", "nightly"] }
default = std

The std feature is set by default whenever const-hex is added without default-features = false somewhere in the dependency tree.

std default __fuzzing? = alloc

Enables std of optional hex, optional proptest, and optional serde

proptest:

Enables the use of standard-library dependent features

alloc std

Enables alloc of optional hex, optional proptest, and optional serde

serde:

Provide impls for types in the Rust core allocation and collections library including String, Box<T>, Vec<T>, and Cow<T>. This is a subset of std but may be enabled without depending on all of std.

Affects const-hex::encode, const-hex::encode_upper, const-hex::encode_prefixed, const-hex::encode_upper_prefixed, const-hex::decode, traits::ToHexExt

core-error

Enables core::error::Error implementations always instead of conditionally through std. Requires Rust 1.81 or newer.

serde

Serde support. Use with #[serde(with = "const_hex")].

Enables serde, serde of optional hex

hex

Use hex's traits instead of our own. This should not be needed most of the time.

Enables hex

force-generic

Forces generic implementation, overriding any specialized implementation (e.g. x86 or aarch64).

portable-simd

Support for the portable-simd nightly feature. Note that -Zbuild-std may be necessary to unlock better performance than the specialized implementations.

nightly

Enables nightly-only features for better performance.

__fuzzing = std

Internal features.

Enables proptest

Affects const-hex::fuzzing