Cargo Features

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

Need to enable all for backwards compatibility.

std default

Use the standard library.

Enables std of lexical-parse-float, lexical-parse-integer, lexical-util, lexical-write-float, and lexical-write-integer

write-integers default = integers, lexical-write-integer, write

Add support for writing integers.

write-floats default = floats, lexical-write-float, write

Add support for writing floats.

parse-integers default = integers, lexical-parse-integer, parse

Add support for parsing integers.

parse-floats default = floats, lexical-parse-float, parse

Add support for parsing floats.

power-of-two

Add support for parsing power-of-two float strings.

Enables power-of-two of lexical-parse-float, lexical-parse-integer, lexical-util, lexical-write-float, and lexical-write-integer

radix

Add support for parsing non-decimal float strings.

Enables radix of lexical-parse-float, lexical-parse-integer, lexical-util, lexical-write-float, and lexical-write-integer

format

Add support for parsing custom numerical formats.

Enables format of lexical-parse-float, lexical-parse-integer, lexical-util, lexical-write-float, and lexical-write-integer

compact

Reduce code size at the cost of performance.

Enables compact of lexical-parse-float, lexical-parse-integer, lexical-write-float, and lexical-write-integer

safe

Ensure only safe indexing is used.
This is only relevant for the number writers, since the parsers are memory safe by default (and only use memory unsafety when is the trivial to prove correct).

Enables safe of lexical-parse-float, lexical-parse-integer, lexical-write-float, and lexical-write-integer

nightly

Add support for nightly-only features.

Enables nightly of lexical-parse-float, lexical-parse-integer, lexical-write-float, and lexical-write-integer

f16

Enable support for 16-bit floats.

Enables f16 of lexical-parse-float, lexical-util, and lexical-write-float

lint

Internal only features.
Enable the lint checks.

Enables lint of lexical-parse-float, lexical-parse-integer, lexical-util, lexical-write-float, and lexical-write-integer

write write-floats write-integers

Add support for writing numbers.

Affects lexical-core::write, lexical-core::write_unchecked, lexical-core::write_with_options, lexical-core::write_with_options_unchecked

parse parse-floats parse-integers

Add support for parsing numbers.

Affects lexical-core::parse, lexical-core::parse_partial, lexical-core::parse_with_options, lexical-core::parse_partial_with_options

integers parse-integers write-integers

Add support for conversions to or from integers.

floats parse-floats write-floats

Add support for conversions to or from floats.

f128

Currently unsupported.
Enable support for 128-bit floats.

Enables f128 of lexical-parse-float, lexical-util, and lexical-write-float

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

lexical-parse-integer compact? format? lint? nightly? parse-integers power-of-two? radix? safe? std
lexical-write-integer compact? format? lint? nightly? power-of-two? radix? safe? std write-integers
lexical-parse-float compact? f128? f16? format? lint? nightly? parse-floats power-of-two? radix? safe? std
lexical-write-float compact? f128? f16? format? lint? nightly? power-of-two? radix? safe? std write-floats