Cargo Features

const-hex = { version = "1.11.3", default-features = false, features = ["std", "alloc", "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


Enables the use of standard-library dependent features

alloc std

Enables alloc of optional hex, optional proptest, and optional 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


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

Enables serde, serde of optional hex


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

Enables hex


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


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


Enables nightly-only features for better performance.

__fuzzing = std

Internal features.

Enables proptest

Affects const-hex::fuzzing