Releases: Alexhuszagh/rust-lexical
Version 1.0.2 Release
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_zeros
was 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.
Version 1.0.1 Release
Fixed
- A correctness regression.
- Regressions where parsing digit separators without the
compact
panicked.
v1.0.0 Release
The full changelog is as follows:
Added
- Added fuzzing and miri code safety analysis to our CI pipelines.
- Removed requirement of
alloc
inno_std
ennvironments without thewrite
feature. - 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.0
with 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-util
and clearly documented the preconditions to use safely. - Removed almost all unsafety in
lexical-write-integer
and 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
_unchecked
API methods, since the performance benefits are dubious and it makes safety invariant checking much harder. - The
safe
andnightly
features, since ASM is now supported by the MSRV on stable and opt-in for memory-safe indexing is no longer relevant.
Lexical-Core Version 0.8.6 Release
Changed
- Fixed partial integer parser to correct return negative values.
Lexical-Core Version 0.8.5 Release
Changed
- Fixed numeric overflow bug causing panic (should explicitly wrap) in dragonbox algorithm's
umul192_lower128
. - Fixed new warnings in nightly
clippy
andfmt
lints. - Fixed comprehensive test suites due to new
clap
versions. - Disabled
powerpc64le
checks due to bugs in workflow.
Lexical-Core Version 0.8.4 Release
Updated the algorithms used in float writing to use the latest improvements to dragonbox. The resulting code is more compact, and should compile faster due to not requiring static table generation during compilation.
Lexical-Core Version 0.8.3 Release
Numerous bug fixes and minor feature additions.
- Added support for
-Zmiri-tag-raw-pointers
in miri correctness checks. - Added the documented functions
format_error
andformat_is_valid
to determine if a format packed struct is valid, since the previous checks relied on undocumented behavior. - Added
from_radix
toParseFloatOptions
andWriteFloatOptions
, to simplify creating the default options with a different radix. - Fixed
no_std
inlexical-parse-float
when default features are disabled. - Fixed issue in parsing integers and floats with the
power-of-two
feature enabled for radixes 16 and 32.
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.