lexical-parse-float
Efficient parsing of floats from strings.
1.0.6
117M downloads/mo
#731 most downloaded on crates.io
Alexhuszagh/rust-lexical
What this package is like to depend on
Last release 11 months ago
21 Sep 2025
Ships unpredictably
gaps range from 1 weeks to 2.3 years
Nearly every release is documented
notes for 10 of 10 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
10 releases · first in 2021
1 release in the last 12 months
see the full history below
Release timeline
10 releases · Sep 2021 to Sep 2025
2022
2023
2024
2025
2026
Releases
latest 10-
1.0.621 Sep 2025 -
1.0.508 Dec 2024 -
1.0.306 Dec 2024Release notes
Open source →Changed
- Improved performance of number formatting with non-decimal radices (#169).
Fixed
- Inaccurate number formatting with non-decimal radices (#169).
Release notes
Open source →Changed
- Improved performance of number formatting with non-decimal radices (#169).
Fixed
- Inaccurate number formatting with non-decimal radices (#169).
-
1.0.225 Sep 2024Release notes
Open source →Changed
- Higher performance when parsing floats with digit separators.
Fixed
- Inlining inconsistency between public API methods (credit to @zheland)
- Incorrectly accepting leading zeros when
no_integer_leading_zeroswas enabled. - Have consistent errors when an invalid leading digit is found for floating point numbers to always be
Error::InvalidDigit. - Incorrect parsing of consecutive digit separators.
- Inaccuracies when parsing digit separators at various positions leading to incorect errors being returned.
- Selecting only a subset of parse and/or write features would cause compilation errors.
- Fixed bug with writing integers with custom radices.
-
1.0.115 Sep 2024Release notes
Open source →Fixed
- A correctness regression.
- Regressions where parsing digit separators without the
compactpanicked.
-
1.0.014 Sep 2024Release notes
Open source →Added
- Added fuzzing and miri code safety analysis to our CI pipelines.
- Removed requirement of
allocinno_stdennvironments without thewritefeature. - Make multi-digit optimizations in integer parsing optional.
- Much higher miri coverage including for proptests and our corner cases from the golang test suite.
Changed
- Updated the MSRV to 1.63.0 (1.65.0 for development).
- Improved performance due to compiler regressions in rustc 1.81.0 and above.
Fixed
- Removed use of undefined behavior in
MaybeUninit. - Provide better safety documentation.
- Parsing of Ruby float literals.
- Performance regressions in Rust 1.81.0+.
- Removed incorrect bounds checking in reading from iterators.
- Overflow checking with integer parsing.
- Writing
-0.0with a leading-. - Reduced binary siezes when the compact feature was enabled.
- Improved performance of integer and float parsing, particularly with small integers.
- Removed almost all unsafety in
lexical-utiland clearly documented the preconditions to use safely. - Removed almost all unsafety in
lexical-write-integerand clearly documented the preconditions to use safely. - Writing special numbers even with invalid float formats is now always memory safe.
Removed
- Support for mips (MIPS), mipsel (MIPS LE), mips64 (MIPS64 BE), and mips64el (MIPS64 LE) on Linux.
- All
_uncheckedAPI methods, since the performance benefits are dubious and it makes safety invariant checking much harder. - The
safeandnightlyfeatures, since ASM is now supported by the MSRV on stable and opt-in for memory-safe indexing is no longer relevant.
-
0.8.518 May 2022Release notes
Open source →Changed
- Fixed the partial integer parser to correctly return negative values if parsing partial input.
-
0.8.310 Mar 2022Release notes
Open source →Added
- Added support for
-Zmiri-tag-raw-pointersin miri correctness checks. - Added the documented functions
format_errorandformat_is_validto determine if a format packed struct is valid, since the previous checks relied on undocumented behavior. - Added
from_radixtoParseFloatOptionsandWriteFloatOptions, to simplify creating the default options with a different radix.
Changed
- Fixed
no_stdinlexical-parse-floatwhen default features are disabled. - Fixed issue in parsing integers and floats with the
power-of-twofeature enabled for radixes 16 and 32.
- Added support for
-
0.8.204 Oct 2021Release notes
Open source →Changed
- Reproduce all dependent licenses in lexical, and document extensively what features are dependent on what licensing terms.
-
0.8.003 Sep 2021Release notes
Open source →This is a very large release that involved a full re-write from the ground-up.
Added
- Added the Options API
- ParseFloatOptions
- ParseIntegerOptions
- WriteFloatOptions
- WriteIntegerOptions
- Added
parse_with_options,parse_partial_with_options - Added
write_with_options. - Added a faster float writer and parser for power of 2 radixes.
- Added the
required_exponent_notationflag toNumberFormat. - Added the
power-of-twofeature, for conversion to and from strings with power-of-two bases. - Added the
compactfeature, optimized for binary size rather than performance. - Added extensive documentation on benchmarks, algorithms used, and internal implementation details.
Changed
- Made the Eisel-Lemire algorithm the default float-parser, leading to substantial improvements in performance.
- Made Dragonbox the default float writer.
- Removed pre-computed float tables of powers-of-two, and recreated stable powers of 2 through bit manipulations.
- Refactored all numeric conversions into separate crates, using workspaces.
- Improved the algorithms to write and parse 128-bit integers, using faster division and multiplication algorithms.
- Updated the MSRV to 1.51.0.
- Updated the benchmarks to note the significant algorithm changes.
- Added automatic formatting via Rustfmt, linting via Clippy, as well as increased documentation of safety guarantees.
- Re-wrote NumberFormat to allow more extensive configuration and use const generics.
- Added support for base prefixes and suffixes.
- Reduced static storage required for extended-float algorithms.
- Fixed a bug with trailing digit separators in special values.
- Updated the fuzz handlers and conformance tests.
- Simplified the big-integer arithmetic, improving performance and simplifying maintenance for float parsing algorithms.
Removed
- Remove the
write_format,write_radix, and similar functions. - Remove the
parse_format,parse_radix, and similar functions. - Removed the
dtoafeature. - Removed the
roundingfeature. - Removed the lexical-capi. Existing, high-performance C/C++ libraries exist, so it's no longer practical.
- Added the Options API