NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #79 most downloaded on crates.io
Typenum is a Rust library for type-level numbers evaluated at compile time. It currently supports bits, unsigned integers, and signed integers. It also provides a type-level array of type-level numbers, but its implementation is incomplete.
Last release 4 months ago
29 May 2026
Ships fairly regularly
a new release about every 8 months
Most releases are documented
notes for 25 of 34 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
34 releases · first in 2015
d1b13a8 : Don't publish internal crate (Paho Lurie-Gregg)
One column per quarter.
77b877d : remove deprecated features, replace build script with pre-generated tests ( #237 ) (Cathal) #237
no_std feature flag (deprecated since 1.3.0)force_unix_path_separator feature flag (deprecated since 1.17.0)build.rs script with pre-generated test files6b1603e : Remove deprecated feature flag from lib.rs ( #231 ) (Yuki Okushi) #231
const-generics feature
on 16-bit targetscore::fmt::BinaryToInt for isize, i128, and u128FoldAdd and FoldMul ( #209 ) #209 ( Daniel-Aaron-Bloom )
FoldAdd and FoldMul (#209) #209 (Daniel-Aaron-Bloom)tarr! macro (PR #214)FoldAdd and FoldMul to get the sum/product of an array (PR #209)feature gate uint > u32::MAX to 64 bit architectures ( #197 ) #197 ( benluelo )
force_unix_path_separator feature, make it the defaultf3e1972 : Add generic const mappings (Daniel Henry-Mantilla) #176
const mappings (Daniel Henry-Mantilla) #176build.rs execution (Daniel Henry-Mantilla) #176const field to the ToInt trait to allow its use in const contexts (#179) (winestone) #179const INT field to the ToInt trait.const-generics field with U<N> mapping where N is a const generic.500ef75 : Seal all marker traits and bump version ( #174 ) (Paho Lurie-Gregg) #174
scale_info for using inside
Substrate-based runtimes (PR
#175)ff1bf0c : Update version to 1.13 ( #168 ) (Paho Lurie-Gregg) #168
[ 21e6a44 ]: Clarification of MIT, Apache-2.0 dual license (Akhil Velagapudi)
assert_type{,_eq}! at top-level & const ctx (Waffle) #152local_inner_macros for 2018 edition support. (Charles Lew) #160op macro with 2018 edition import.assert_type_eq and assert_type at top level.Zero for Z0, U0, and B0.Pow trait for f32 and f64 with negative exponent.ToInt.[added] Feature force_unix_path_separator to support building without Cargo.
force_unix_path_separator to support building without Cargo.Gcd with alias Gcf.gcd to the op! macro.Copy bound to Rhs of Mul<Rhs> impl for <TArr<V, A>.Copy bound to Rhs of Div<Rhs> impl for <TArr<V, A>.Copy bound to Rhs of PartialDiv<Rhs> impl for <TArr<V, A>.Copy bound to Rhs of Rem<Rhs> impl for <TArr<V, A>.[fixed] Cross compilation from Linux to Windows.
[fixed] Builds on earlier Rust builds again and added Rust 1.22.0 to Travis to prevent future breakage.
[added] Integer log2 to the op! macro.
log2 to the op! macro.Logarithm2 with alias Log2.feature(i128_type) when running with the i128
feature. Kept the feature flag. for typenum to maintain compatibility with
old Rust versions.sqrt to the op! macro.SquareRoot with alias Sqrt.[added] The PowerOfTwo marker trait.
PowerOfTwo marker trait.Bit, Unsigned, and Integer.[added] The Abs type operator and corresponding AbsVal alias.
Abs type operator and corresponding AbsVal alias.i128 that enables creating 128-bit integers from
typenums.assert_type! and assert_type_eq! macros.op! macro, including those performed by cmp!.op! macro involving functions and convoluted expressions.cmp! macro.[added] The op! macro for conveniently performing type-level operations.
op! macro for conveniently performing type-level operations.cmp! macro for conveniently performing type-level comparisons.cmp! macro.[added] Type operators Min and Max with accompanying aliases Minimum and Maximum
Min and Max with accompanying aliases Minimum and
Maximum[fixed] Bug where Rem would sometimes exit early with the wrong answer.
Array division.Rem would sometimes exit early with the wrong answer.PartialDiv operator that performs division as a partial function --
it's defined only when there is no remainder.[fixed] Bug between Div implementation and type system.
Div implementation and type system.[fixed] Expanded implementation of Pow for primitives.
Pow for primitives.[added] Functions to the Pow and Len traits. This is *technically* a breaking change, but it would only break someone's code if they have a custom imp…
Pow and Len traits. This is technically a
breaking change, but it would only break someone's code if they have a custom
impl for Pow. I would be very surprised if that is anyone other than me.[added] Type-level arrays of type-level integers. (PR #66)
Nothing published for this version
[fixed] Bug with recent nightlies.
[changed] Removed dependency on libstd. (Issue #53, PR #55)
[added] Convenience type aliases for operators. (Issue #48, PR #50)
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →