NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #1842 most downloaded on crates.io
Unsigned integer type with const-generic bit length
Last release 22 days ago
15 Sep 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 36 of 36 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
36 releases · first in 2022
One column per quarter.
chore(deps): bump the ci-weekly group with 2 updates by @dependabot [bot] in #621
Full Changelog: v1.20.0...v1.20.1
u64/i64 on 32-bit targets and u128/i128, without truncating oversized shift amounts (#634)fix(algorithms): close soundness and safety-contract gaps by @prestwich in #612
Full Changelog: v1.19.0...v1.20.0
PartialEq and is_zero on riscv to avoid memcmp libcalls (#604)wasm32-wasip1 in CI to catch 32-bit pointer-width bugs (#609)reverse_bits, most_significant_bits, inv_ring, checked_pow, strict_pow, overflowing_pow, pow, saturating_pow, wrapping_pow, from_limbs_slice, checked_from_limbs_slice, wrapping_from_limbs_slice, overflowing_from_limbs_slice, saturating_from_limbs_slice, from_uint, and checked_from_uint const (#614)overflowing_shl/overflowing_shr overflow-flag false negatives, which also corrected the dependent checked_*/strict_*/saturating_* shifts and byte() (#603)from_str_radix rejecting the lowercase digits g–z in radix 64 (#605)f64 in TryFrom<f64> and saturate Uint→f64 conversions at 2^1024 for large BITS (#606)try_from_be_slice/try_from_le_slice now return None instead of panicking for BITS % 64 in 57..=63 (#607)from_str_radix and to_base_be no longer hang or silently accept radix/base 0 or 1 (#608)checked_log, checked_log2, and checked_log10 no longer panic for small bit-widths where the base constant does not fit the type (#610)add, mul, and gcd algorithms (#611)addmul_nx1/submul_nx1 unsafe and close soundness / safety-contract gaps in the unstable algorithms module (#612)fix: resolve easy TODOs and doc issues by @DaniPopes in #571
to_be_bytes on big-endian platforms by @kayabaNerve in #576Full Changelog: v1.18.0...v1.19.0
strict_* arithmetic operations (#595)ark-ff-06 feature flag for conversion to ark-ff@0.6 types (#584)from_str_radix const (#591)const (#590)Ord::cmp by comparing via subtraction (#579)to_be_bytes on big-endian platforms (#576)Use rkyv::ArchivedU64 by @DenisGorbachev in #556
Full Changelog: v1.17.2...v1.18.0
from_str_radix (#557)Ord::cmp, const_eq, const_is_zero for small sizes (#561)to_be_bytes for full-limb sizes via per-limb swap_bytes (#569)rkyv::primitive::ArchivedU64 (#556)fix(docsrs): remove doc_auto_cfg by @DaniPopes in #554
Full Changelog: v1.17.1...v1.17.2
Fix codspeed benches & add most_significant_bits bench by @Evalir in #544
Full Changelog: v1.17.0...v1.17.1
unsafe to many unstable API functions in algorithms module, and
documented their conditions of use (COU). (#552)chore: add parse benches by @DaniPopes in #518
serde_core instead of serde by @DaniPopes in #527*next* functions const by @DaniPopes in #533Full Changelog: v1.16.0...v1.17.0
ark-ff-05 feature flag for conversion to ark-ff@0.5 types (#526)*next_power_of_two and *next_multiple_of const (#533)TryFrom<f64> for Uint to speed it up, fixing edge cases and removing std requirements (#524)From<Uint> for f64 and f32 to speed it up, fixing edge cases and removing std requirements ([#535])Add Codspeed workflow by @recmo in #468
bigdecimal crate by @klkvr in #486mod algorithms by @DaniPopes in #511Full Changelog: v1.15.0...v1.16.0
bigdecimal support (#486)PartialEq and PartialOrd implementations for primitive integers; minor breaking change for type inference (#491)to_base_be and core::fmt trait implementations are available without the "alloc" feature (#488)dep: update pyo3 to 0.25 by @Evalir in #460
Full Changelog: v1.14.0...v1.15.0
chore: clippy by @DaniPopes in #437
checked_byte bounds check and make it const by @DaniPopes in #438try_from_{b,l}e_slice docs by @DaniPopes in #439const ONE by @DaniPopes in #448random, random_with, randomize, randomize_with methods by @DaniPopes in #444Full Changelog: v1.13.1...v1.14.0
not function (#442)leading_zeros, leading_ones, count_ones, count_zeros, bit_len, byte_len, is_power_of_two functions const (#442)random, random_with, randomize, randomize_with methods (#444)const ONE (#448)try_from_{b,l}e_slice documentation (#439)checked_byte bounds check and make it const (#438)fix: no_std build by removing unused dependency by @DaniPopes in #433
Full Changelog: v1.13.0...v1.13.1
Support for borsh @ 1.5 ([#416])
Support for sqlx @ 0.7. This is a breaking change, outside of regular semver policy, as 0.7 contains a security vulnerability ([#400])
Uint::square_redc. (#402)subtle and der (#399)Uint::mul_redc is now alloc free (#402)Use borrowing/carrying ops in add/sub, remove bound checks in shifts ([#366])
uint! in item position ([#360])
Wrap the uint! macro to allow usage without needing uint import ([#350])
Typo in Shr implementation ([#343])
Uint::is_zero() -> bool ([#296])
bytemuck feature (#292)Uint::is_zero() -> bool (#296)num-traits features (#298)U768 alias (#310)add and sub performance (#316)add and sub functions const (#324){from,to}_{b,l}e_bytes const (#329)leading_ones failed for non-aligned sizes.Fixed some support features ([#289])
Support for no_std environments ([#274])
Introduce ark-ff-04 feature flag for conversion to ark-ff@0.4 types
ark-ff-04 feature flag for conversion to ark-ff@0.4 typesalloy-rlpTryFrom<bool> for Uintbyteserde::Deserialize impl more permissiveQuantity encoding for serde serialization when human-readablefrom_base_be that allowed instantiation of overflowing Uintfastrlp to 0.3, pyo3 to 0.19, and sqlx-core to 0.7fastrlp perfomanceproptest performancesupport module and its modules publicalgorithm functions publicas_le_slice and as_le_bytesnightly cargo featurederive_morefrom_base_le implementation by reversing the input iteratorSupport bn-rs, serde and uint! for Bits
bn-rs, serde and uint! for Bits0x0 and rejects zero prefixes.Edge case in which an overflow occurs when parsing a Uint with uint! ([#199]).
rlp for BitsUint with uint! (#199).Bit type aliases (B128, B160, B256, B512, ...)
TryFrom<Uint> for usizeB128, B160, B256, B512, ...)From and Into trait implementations for primitive-types bit typesbn-rsDefault for Bitspow and log to Uint.wrapping_pow implementation.Performance improvements in wrapping_mul and from_bytes_be.
wrapping_mul and from_bytes_be.Add parity-scale-codec support.
parity-scale-codec support.algorithms::div module and improved div algorithm.Made primitive-types version flexible.
primitive-types version flexible.from_uint and checked_from_uint are now deprecated.
Pyo3 support.from now supports Uint arguments.saturating_from, wrapping_from, to, wrapping_to, saturating_to.wrapping_from_limbs_slice, overflowing_from_limbs_slice, saturating_from_limbs_slice.zeroize and valuable support.ToUintError and FromUintError now contain wrapped value and other context.from_uint and checked_from_uint are now deprecated.Added inv_mod, mul_redc, gcd, gcd_extended, lcm.
inv_mod, mul_redc, gcd, gcd_extended, lcm.sqlx support.ring_inverse to inv_ring.Added reduce_mod, add_mod, mul_mod, pow_mod.
reduce_mod, add_mod, mul_mod, pow_mod.num-bigint and ark-ff support.algorithms public, but with unstable API for now.Uint::as_limbs_mut as unsafe.mul implementations and move to algorithms.uint! macro incorrectly accepting hex digits in decimal.Added approx_log, approx_log2, approx_log10 for f64 log approximations.
saturating_shl.approx_log, approx_log2, approx_log10 for f64 log approximations.approx_pow2 to construct from f64 log2 approximation.root computing integer roots.usize to match BITS in pow, log functions.track_caller to div/rem ops to track div-by-zero easier.Added add, sub, neg and sum functions.
next_power_of_two and next_multiple_of functions.checked_from_limb_slice and from_uint.from_limb_slice now handles arbitrary length slices.All the binary operations (not, and, or, xor, shifts, rotate, etc)
Bits, a newtype wrapped Uint restricted to non-numeric operations.FromSql support and JSON column support.from_base_le and from_base_be base conversion.from_str_radix string base conversion up to base64.FromStr trait with decimal, hex, octal and binary support.reverse_bits is now by value instead of &mut self.Extensive Postgres ToSql support supporting many column types.
TryFrom<Uint> for primitive integer types.From conversions to f32 and f64.Debug, Display, decimal, hex, etc.>>= operator.to_base_le and to_base_le base conversion spigotsreverse_bits, most_sigificant_bits bit methods.as_le_{slice,bytes)_* accessors.to_{be,le}_bytes_* to use optimized methods. This has trickle-down
effects for a lot of conversions and formatting.Common bit-size aliases and nightly-only Uint alias.
Uint<BITS> alias.to_{be/le}_bytes_vec and made try_from_le_byte_iter public.rlp and fastrlp support.into_limbs, leading_zeros, bit_len, byte_len, checked_log2.primitive-types support.Uint<BITS, LIMBS> to get stable compatibility!BYTES parameter to to_{be/le}_bytes.try_from_{be/le}_slice.Basic overflowing_add implementation.
Uint structure.overflowing_add implementation.uint! and const_for! macros.<!-- links to version -->
Your coding agent can read these notes before it upgrades. Set up the MCP server →