All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix
to_be_byteson big-endian platforms ([#576])
1.18.0 - 2026-04-22
- Optimize
from_str_radix(#557) - Specialize
Ord::cmp,const_eq,const_is_zerofor small sizes (#561) - Use bit shifts for power-of-two formatting (binary, octal, hex) instead of division (#565)
- Optimize
to_be_bytesfor full-limb sizes via per-limbswap_bytes(#569) - Extract last iteration on mul loop to reduce register pressure (#566)
- Use
rkyv::primitive::ArchivedU64(#556)
1.17.2 - 2025-12-28
- fix(docsrs): remove doc_auto_cfg (#554)
1.17.1 - 2025-12-26
- Added
unsafeto many unstable API functions inalgorithmsmodule, and documented their conditions of use (COU). (#552)
1.17.0 - 2025-09-24
- Support for bincode 2 (#516)
- Introduce
ark-ff-05feature flag for conversion toark-ff@0.5types (#526)
- MSRV bumped to 1.85 (#503)
- Made
*next_power_of_twoand*next_multiple_ofconst(#533) - Reimplemented
TryFrom<f64>forUintto speed it up, fixing edge cases and removingstdrequirements (#524) - Reimplemented
From<Uint>forf64andf32to speed it up, fixing edge cases and removingstdrequirements ([#535])
1.16.0 - 2025-08-04
- Support rkyv (#483)
- Added
bigdecimalsupport (#486) PartialEqandPartialOrdimplementations for primitive integers; minor breaking change for type inference (#491)
to_base_beandcore::fmttrait implementations are available without the "alloc" feature (#488)- Greatly improved performance across the board, mainly in: conversions, fmt, div/rem, mul, add_mod, leading_zeros
- Check limb overflow in shift ops (#476)
1.15.0 - 2025-05-22
- Add
const fnconst_is_zero,const_eq,bit*(#441)
- Updated Pyo3. This is a non-semver breaking change to address a vulnerability reported on Pyo3. (#460)
- Make
rotate*,*sh[lr]functionsconst(#441)
1.14.0 - 2025-03-25
- Add const
notfunction (#442) - Make
leading_zeros,leading_ones,count_ones,count_zeros,bit_len,byte_len,is_power_of_twofunctionsconst(#442) random,random_with,randomize,randomize_withmethods (#444)- rand 0.9 support (#445)
- Add
const ONE(#448)
- Update
try_from_{b,l}e_slicedocumentation (#439)
- Fix
checked_bytebounds check and make it const (#438)
1.13.1 - 2025-02-18
- Remove unused
hexdependencies which brokeno_std(#433)
1.13.0 - 2025-02-18
- Support for borsh @ 1.5 (#416)
copy_le_to_slicefamily to allow easier writing to pre-allocated buffers (#424)- add
Uint::checked_byte(idx: usize) -> Option<u8>(#429)
- Unpin proptest (#426)
- Update documentation related to
Uint::byteand knuth divison (#429) - fix: swap bytes for
as_le_bytesin big endian world (#431)
1.12.4 - 2024-12-16
- Added
Uint::square_redc. (#402) - Support for diesel @ 2.2 (#404)
- Support for sqlx @ 0.8 (#400)
- Support for fastrlp @ 0.4 (#401)
- Added support for
subtleandder(#399)
- Support for sqlx @ 0.7. This is a breaking change, outside of regular semver policy, as 0.7 contains a security vulnerability (#400)
Uint::mul_redcis now alloc free (#402)
1.12.3 - 2024-06-03
- Use borrowing/carrying ops in add/sub, remove bound checks in shifts (#366)
- Make
mul_modnon-allocating (#373)
- Add
allocrequirement tonum-traitsfeature #363
1.12.1 - 2024-03-12
1.12.0 - 2024-02-27
- Wrap the
uint!macro to allow usage without needinguintimport (#350)
- Overflow check in
overflowing_shrimplementation (#347)
1.11.1 - 2023-11-18
- Typo in
Shrimplementation (#343)
- Enable
SSZ(#344)
1.11.0 - 2023-10-31
bytemuckfeature (#292)Uint::is_zero() -> bool(#296)num-traitsfeatures (#298)U768alias (#310)- Improved
addandsubperformance (#316) - Made
addandsubfunctionsconst(#324) - Made
{from,to}_{b,l}e_bytesconst(#329)
- Restricted RLP decoding to match the RLP spec and disallow leading zeros (#335)
leading_onesfailed for non-aligned sizes.
1.10.1 - 2023-07-30
- Fixed some support features (#289)
1.10.0 - 2023-07-30
1.9.0 - 2023-07-25
- Introduce
ark-ff-04feature flag for conversion toark-ff@0.4types - Support for
alloy-rlp - MSRV (Minimum Supported Rust Version) is now set at 1.65.0, from previously undefined
- Implement
TryFrom<bool>forUint - New method:
byte
- Make
serde::Deserializeimpl more permissive - Use Ethereum
Quantityencoding for serde serialization when human-readable - Fix error in
from_base_bethat allowed instantiation of overflowingUint - Updated
fastrlpto0.3,pyo3to0.19, andsqlx-coreto0.7 - Improved
fastrlpperfomance - Improved
proptestperformance - Made
supportmodule and its modules public - Made more
algorithmfunctions public - Constified
as_le_sliceandas_le_bytes
- Automatic detection of nightly features. Enable them instead with the
nightlycargo feature - Dependency on
derive_more
from_base_leimplementation by reversing the input iterator
1.8.0 — 2023-04-19
- Support
bn-rs,serdeanduint!forBits
- Serde human readable now encodes the empty bitstring as
0x0and rejects zero prefixes.
1.7.0 — 2022-10-31
- Support
rlpforBits
- Edge case in which an overflow occurs when parsing a
Uintwithuint!(#199).
1.6.0 — 2022-10-28
TryFrom<Uint> for usize- Bit type aliases (
B128,B160,B256,B512, ...) FromandIntotrait implementations forprimitive-typesbit types- Support for
bn-rs - Derive
DefaultforBits
- (Breaking) Changed the arguments of
powandlogtoUint. - More efficient
wrapping_powimplementation.
1.5.1 — 2022-10-24
- Performance improvements in
wrapping_mulandfrom_bytes_be.
1.5.0 — 2022-10-24
- Add
parity-scale-codecsupport. - Added unstable
algorithms::divmodule and improved div algorithm.
1.4.1 — 2022-10-15
- Made
primitive-typesversion flexible.
1.4.0 — 2022-10-02
- Add
Pyo3support. fromnow supportsUintarguments.saturating_from,wrapping_from,to,wrapping_to,saturating_to.wrapping_from_limbs_slice,overflowing_from_limbs_slice,saturating_from_limbs_slice.- Add
zeroizeandvaluablesupport.
ToUintErrorandFromUintErrornow contain wrapped value and other context.from_uintandchecked_from_uintare now deprecated.
1.3.0 — 2022-06-08
- Added
inv_mod,mul_redc,gcd,gcd_extended,lcm. - Added
sqlxsupport.
- Renamed
ring_inversetoinv_ring.
1.2.0 — 2022-06-03
- Added
reduce_mod,add_mod,mul_mod,pow_mod. - Added
num-bigintandark-ffsupport. - Made
algorithmspublic, but with unstable API for now.
- Marked
Uint::as_limbs_mutas unsafe. - Unified
mulimplementations and move toalgorithms.
uint!macro incorrectly accepting hex digits in decimal.
1.1.0 — 2022-05-31
- Added
saturating_shl. - Added
approx_log,approx_log2,approx_log10forf64log approximations. - Added
approx_pow2to construct fromf64log2 approximation. - Added
rootcomputing integer roots.
- Made logarithms
usizeto matchBITSinpow,logfunctions. - Applied
track_callerto div/rem ops to track div-by-zero easier.
1.0.0 — 2022-05-28
- Added comparison.
- Added add, sub, neg and sum functions.
- Added mul functions.
- Added division and remainder functions.
- Added pow and log functions.
- Added
next_power_of_twoandnext_multiple_offunctions. - Added
checked_from_limb_sliceandfrom_uint.
from_limb_slicenow handles arbitrary length slices.
0.3.0 — 2022-05-23
- All the binary operations (not, and, or, xor, shifts, rotate, etc)
Bits, a newtype wrappedUintrestricted to non-numeric operations.- Postgres
FromSqlsupport and JSON column support. from_base_leandfrom_base_bebase conversion.from_str_radixstring base conversion up to base64.FromStrtrait with decimal, hex, octal and binary support.
reverse_bitsis now by value instead of&mut self.
0.2.1 — 2022-05-18
- Extensive Postgres ToSql support supporting many column types.
TryFrom<Uint>for primitive integer types.- Added
Fromconversions tof32andf64. - Implement all rust formatting:
Debug,Display, decimal, hex, etc. >>=operator.to_base_leandto_base_lebase conversion spigotsreverse_bits,most_sigificant_bitsbit methods.- Optimized
as_le_{slice,bytes)_*accessors.
- Rewrote
to_{be,le}_bytes_*to use optimized methods. This has trickle-down effects for a lot of conversions and formatting.
0.2.0 — 2022-05-16
- Changelog
- CI test on stable Rust.
- Common bit-size aliases and nightly-only
Uint<BITS>alias. - Added
to_{be/le}_bytes_vecand madetry_from_le_byte_iterpublic. - Added
rlpandfastrlpsupport. - Added
into_limbs,leading_zeros,bit_len,byte_len,checked_log2. - Added
primitive-typessupport.
- Changed to
Uint<BITS, LIMBS>to get stable compatibility! - Added generic
BYTESparameter toto_{be/le}_bytes. - Renamed
try_from_{be/le}_slice.
0.1.0 — 2022-05-15
- Const-generic
Uintstructure. - Basic
overflowing_addimplementation. - Algorithms for division and gcd (currently unused).
uint!andconst_for!macros.- Documentation with examples.
- Support for rand, arbitrary, quickcheck, proptest, serde
- Github actions for linting, testing, code coverage, cargo-audit.
- Pushed to crates.io.