Cargo Features

[dependencies]
lexical-util = { version = "0.8.5", default-features = false, features = ["std", "power-of-two", "radix", "format", "write-integers", "write-floats", "parse-integers", "parse-floats", "compact", "lint", "write", "parse", "integers", "floats", "f16", "f128"] }

FEATURES
--------
In order to improve compile times, we have separate support for each numeric conversion. Since these features are additive,
if more features are added, separate crates can add support for more features without requiring re-compilation of lexical.

default = std

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

std default

Use the standard library.

power-of-two radix?

Add support for numerical conversions with power-of-two strings.

Affects assert::debug_assert_radix, assert::assert_radix, feature_format::CXX_HEX_LITERAL, feature_format::CXX_HEX_STRING, feature_format::CXX20_HEX_LITERAL, feature_format::CXX20_HEX_STRING, feature_format::CXX17_HEX_LITERAL, feature_format::CXX17_HEX_STRING, feature_format::CXX14_HEX_STRING, feature_format::CXX11_HEX_STRING, feature_format::C_HEX_LITERAL, feature_format::C_HEX_STRING, feature_format::C18_HEX_LITERAL, feature_format::C18_HEX_STRING, feature_format::C11_HEX_LITERAL, feature_format::C11_HEX_STRING, feature_format::C99_HEX_LITERAL, feature_format::C99_HEX_STRING, assert::assert_buffer

radix = power-of-two

Add support for numerical conversions with non-decimal strings.

Affects assert::debug_assert_radix, assert::assert_radix

format

Add support for parsing custom numerical formats.

write-integers = integers, write

Add support for writing integers.

write-floats = floats, write

Add support for writing floats.

parse-integers = integers, parse

Add support for parsing integers.

parse-floats = floats, parse

Add support for parsing floats.

compact

Reduce code size at the cost of performance.

lint

Internal only features.
Enable the lint checks.

write write-floats? write-integers?

Add support for writing numbers.

Affects algorithm::copy_to_dst, algorithm::rtrim_char_count, algorithm::ltrim_char_count, algorithm::rtrim_char_slice, assert::debug_assert_buffer, assert::assert_buffer, digit::digit_to_char, options::WriteOptions, assert::assert_buffer, digit::digit_to_char_const

parse parse-floats? parse-integers?

Add support for parsing numbers.

Affects digit::char_to_digit, digit::char_is_digit, options::ParseOptions

integers parse-integers? write-integers?

Add support for conversions to or from integers.

floats f128? f16? parse-floats? write-floats?

Add support for conversions to or from floats.

Affects num::Float, digit::digit_to_char_const

f16 = floats

Currently unsupported.
Enable support for 16-bit floats.

Affects num::AsPrimitive.as_f16, num::AsPrimitive.as_bf16

f128 = floats

Enable support for 128-bit floats.