Releases: Alexhuszagh/rust-lexical
Lexical-Core Version 0.8.2 Release
Reproduced all dependent licenses in lexical, and document extensively what features are dependent on what licensing terms.
Bug Fix for Number Format API
- Fix for #66
Existing code using digit separators such as "4_2.0" in the integral component would fail, due the counting of non-digit separators in number parsing not incrementing when calling step_by_unchecked
. This led to erroneous Error::EmptyInteger
results.
Lexical-Core Version 0.8.0 Release
This was a large release that Involved a near complete re-write of lexical for faster algorithms, a simpler internal design, and faster digit parsing implementations.
Options API
- Added the Options API, a way to customize numeric conversions at runtime. The Options API is described in depth here, and contains the following structs:
- ParseFloatOptions
- ParseIntegerOptions
- WriteFloatOptions
- WriteIntegerOptions
Format API
- Change
NumberFormat
to be a packedu128
struct to allow more extensive configuration and use const generics. - Changed
NumberFormat
to be an internal implementation detail, andNumberFormatBuilder
to be the public API for creating custom formats at compile time.
Simplified the public API
-
Added
parse_with_options
,parse_partial_with_options
. -
Added
write_with_options
,write_unchecked
, andwrite_with_options_unchecked
. -
Remove the
write_format
,write_radix
, and similar functions. -
Remove the
parse_format
,parse_radix
, and similar functions. -
Added a faster float writer and parser for power of 2 radixes.
-
Added the
required_exponent_notation
flag toNumberFormat
. -
Added the
power-of-two
feature, for conversion to and from strings with power-of-two bases. -
Added the
compact
feature, optimized for binary size rather than performance. -
Added extensive documentation on benchmarks, algorithms used, and internal implementation details.
Removal Features
- Removed the
dtoa
feature. This allows only 1 compact backend and 1 performance backend, for fully additive features. The new Dragonbox algorithm is faster than any existing algorithms. - Removed the
rounding
feature. This was never used in practice. - Removed the lexical-capi. Existing, high-performance C/C++ libraries exist, so it's no longer practical.
Algorithm Improvements
- 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.
- Improved the algorithms to write and parse 128-bit integers, using faster division and multiplication algorithms.
- Simplified the big-integer arithmetic, improving performance and simplifying maintenance for float parsing algorithms.
Other Changes
- 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.
- Added support for base prefixes and suffixes.
- Reduced static storage required for extended-float algorithms.
- Updated the fuzz handlers and conformance tests.
- Refactored all numeric conversions into separate crates, using workspaces.
Bug Fixes
- Fixed a bug with trailing digit separators in special values.
Lexical-Core Version 0.7.6 Release
- Updated cfg_if version.
- Downgraded rand to fix proptests.
- Fixed a bug on newer Rustc versions where
slice::sort
is not present inno_std
. - Added a feature
libm
which enables stableno_std
use. - Patched an implementation of insert_many due to a security advisory which does not affect lexical.
Lexical-Core Version 0.7.5 Release
Fixed issue with Integer::BITS
conflicting with new compilers.
Lexical-Core Version 0.6.8 Release
- Patched an implementation of insert_many due to a security advisory which does not affect lexical.
- Fixed build script for cross-compiling.
- Updated cfg_if version.
Lexical-Core Version 0.4.8 Release
- Updated cfg_if dependency.
- Dropped support for Rustc versions older than 1.31.0.
- Patched an implementation of insert_many due to a security advisory which does not affect lexical.
- Fixed build script for cross-compiling.
Lexical-Core Version 0.7.4 Release
Updated NumberFormat flags.
- Changed NumberFormat to use 64-bit flags.
- Added
NO_INTEGER_LEADING_ZEROS
andNO_FLOAT_LEADING_ZEROS
NumberFormat flags. - Added
InvalidLeadingZeros
to ErrorCode enum. - Added
validate_no_leading_zeros
to reject invalid inputs. - Added new leading zero checks to all pre-defined NumberFormat constants.
Lexical-Core Version 0.6.7 Release
Updated NumberFormat flags.
- Changed NumberFormat to use 64-bit flags.
- Added
NO_INTEGER_LEADING_ZEROS
andNO_FLOAT_LEADING_ZEROS
NumberFormat flags. - Added
InvalidLeadingZeros
to ErrorCode enum. - Added
validate_no_leading_zeros
to reject invalid inputs. - Added new leading zero checks to all pre-defined NumberFormat constants.
Lexical-Core Version 0.7.3 Release
Updated the format bitflags to make matches more efficient.
- Digit separator flags are grouped by component (integer, etc.).
- Allows jump tables for for internal matches.