PackageTrack
Sign in Get early access

typenum

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.

1.20.1 824M downloads/mo #83 most downloaded on crates.io paholg/typenum

What this package is like to depend on

Last release 2 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

3 releases in the last 12 months

see the full history below

Release timeline

34 releases · Sep 2015 to May 2026
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 34
  1. 1.20.1 29 May 2026
    Release notes

    Commits

    • d1b13a8: Don't publish internal crate (Paho Lurie-Gregg)
    • 298ccdc: Update some URLs (#243) (Alex Touchet) #243
    • 7925b8c: tarr macro: use fully qualified path (#244) (jsen-) #244
    • 0db9a0f: Version 1.20.1 (Paho Lurie-Gregg)
    Open source →
    Release notes
    • [fixed] Fixed tarr import resolution
    Open source →
  2. 1.20.0 19 Apr 2026
    Release notes

    Commits

    • 77b877d: remove deprecated features, replace build script with pre-generated tests (#237) (Cathal) #237
    • 4d5f26b: Add tuple operations (#242) (grenewode) #242
    • c755e2f: Version 1.20.0 (Paho Lurie-Gregg)
    Open source →
    Release notes
    • [removed] Removed no_std feature flag (deprecated since 1.3.0)
    • [removed] Removed force_unix_path_separator feature flag (deprecated since 1.17.0)
    • [changed] Replaced build.rs script with pre-generated test files
    • [added] Indexing into tuples
    • [changed] MSRV now 1.41.0
    Open source →
  3. 1.19.0 02 Oct 2025
    Release notes

    Chores

    Commits

    • 5ab37fa: Mark generated files with git attribute (#222) (David Tolnay) #222
    • 7ceeb76: fix tarr! pattern match (#225) (Kyle Gullion) #225
    • e71d144: Fix const-generics feature on 16-bit targets (#224) (Robin Krahl) #224
    • 6b1603e: Remove deprecated feature flag from lib.rs (#231) (Yuki Okushi) #231
    • f86d468: Fix CI job (Paho Lurie-Gregg)
    • da36818: Remove wrong documentation about type operators (#229) (Asger Hautop Drewsen) #229
    • 9b05f6c: Add core::fmt::Binary support for integers (#228) (Asger Hautop Drewsen) #228
    • 44eece3: Add constants for powers of two minus one (#227) (Asger Hautop Drewsen) #227
    • 39492ae: add implementations for ToInt for isize, i128, and u128 (#230) (blacktemplar) #230
    • 65d1738: Version 1.19.0 (#235) (Paho Lurie-Gregg) #235
    Open source →
    Release notes
    • [fixed] Conflicting trait implementations with the const-generics feature on 16-bit targets
    • [fixed] Remove deprecated feature flag
    • [added] Support core::fmt::Binary
    • [added] Constants for 2^N - 1
    • [added] Implemented ToInt for isize, i128, and u128
    Open source →
  4. 1.18.0 18 Feb 2025
    Release notes

    Features

    Commits

    • b237efb: Version v1.17.0 (#200) (Paho Lurie-Gregg) #200
    • 68980e9: add elixir style capturing of the rest of the array (Kyle Gullion) #214
    • 21c7d60: Setup nix flake (Paho Lurie-Gregg)
    • 137863c: Fix CI build, introduce justfile (#218) (Paho Lurie-Gregg) #218
    • bab772b: Check-in generated code (#219) (Paho Lurie-Gregg) #219
    • 9eec4b7: Add constant for 3600 (#220) (Paho Lurie-Gregg) #220
    • 4bccf7d: Setup nix flake (Paho Lurie-Gregg)
    • 372a281: Fix CI build, introduce justfile (#218) (Paho Lurie-Gregg)
    • 83e03f5: Check-in generated code (#219) (Paho Lurie-Gregg)
    • 74d63c1: Add constant for 3600 (#220) (Paho Lurie-Gregg)
    • 2488205: Merge branch 'kgullion-elixir-style-tarr' (Paho Lurie-Gregg)
    • 67584b5: Version 1.18 (#221) (Paho Lurie-Gregg) #221
    Open source →
    Release notes
    • [changed] Remove build scripts; instead check-in the built code (PR #219)
    • [added] Constants for 3600 (PR #220)
    • [added] Elixir-style syntax for tarr! macro (PR #214)
    • [added] FoldAdd and FoldMul to get the sum/product of an array (PR #209)
    Open source →
  5. 1.17.0 15 Sep 2023
    Release notes

    Features

    Commits

    Open source →
    Release notes
    • [removed] Remove force_unix_path_separator feature, make it the default
    • [added] docs.rs metadata and cfg options
    • [added] Playground metadata
    Open source →
  6. 1.16.0 05 Dec 2022
    Release notes

    Commits

    • f3e1972: Add generic const mappings (Daniel Henry-Mantilla) #176
    • 7d3ee8f: Dev QoL: allow caching the build.rs execution (Daniel Henry-Mantilla) #176
    • 077aa83: Improve the readability of the main page docs, w.r.t. the consts exported (Daniel Henry-Mantilla) #176
    • 2ad6e88: Bump the version (Daniel Henry-Mantilla) #176
    • cb3d2d5: Add a const field to the ToInt trait to allow its use in const contexts (#179) (winestone) #179
    • d3b30c8: Do not emit unnecessary "cargo:rustc-env=" instructions. (#184) (Dinu Blanovschi) #184
    • cf9f811: Merge branch 'main' into main (Paho Lurie-Gregg) #176
    • ba67264: Bump to version 1.16 (#185) (Paho Lurie-Gregg) #185
    Open source →
    Release notes
    • [added] const INT field to the ToInt trait.
    • [added] const-generics field with U<N> mapping where N is a const generic.
    Open source →
  7. 1.15.0 26 Dec 2021
    Release notes

    Commits

    Open source →
    Release notes
    • [fixed] Cross-compilation issue due to doing math in build script. (PR #177)
    • [added] New feature scale_info for using inside Substrate-based runtimes (PR #175)
    Open source →
  8. 1.14.0 01 Sep 2021
    Release notes

    Commits

    • ff1bf0c: Update version to 1.13 (#168) (Paho Lurie-Gregg) #168
    • c2e402b: Set html_root_url attribute (#169) (Trevor Spiteri) #169
    • c4e2d5c: Mark the Bit, Unsigned and Integer traits as 'static (#171) (Trevor Spiteri) #171
    • 3389ca9: Seal all marker traits and bump version (Paho Lurie-Gregg) #174
    Open source →
    Release notes
    • [changed] Sealed all marker traits. Documentation already stated that these should not be implemented outside the crate, so this is not considered a breaking change.
    Open source →
  9. 1.13.0 13 Mar 2021
    Release notes

    Commits

    • [21e6a44]: Clarification of MIT, Apache-2.0 dual license (Akhil Velagapudi)
    • [8362450]: Fix date in changelog (Paho Lurie-Gregg)
    • [d8786ab]: Add impl Pow<NInt<...>> for f{32,64} (Waffle) #151
    • [841b7a3]: update changelog (Waffle) #151
    • [a0be662]: allow calling assert_type{,_eq}! at top-level & const ctx (Waffle) #152
    • [3589cd4]: Add rustfmt.toml to format Rust code in doc comments (jerry73204) #155
    • [4e145da]: Add Zero trait (jerry73204) #137
    • [466df16]: Introduce ToInt type operator (jerry73204) #135
    • [56ca838]: Use edition 2018 (fixes #138) (jerry73204) #156
    • [5cf10f7]: Add local_inner_macros for 2018 edition support. (Charles Lew) #160
    • [581bc6b]: Update default branch (Paho Lurie-Gregg)
    • [bf75832]: Appease clippy (#164) (Paho Lurie-Gregg) #164
    • [c27b83e]: Explore GitHub Actions instead of Travis (#165) (Paho Lurie-Gregg) #165
    • [7e723d0]: Add rustfmt.toml to format Rust code in doc comments (#155) (jerry73204) #155
    • [92504db]: Update build badge (Paho Lurie-Gregg)
    • [64a1993]: Add new() method to Bit trait (#141) (jerry73204) #141
    • [2955684]: Merge branch 'const_assert_ty_eq' of https://github.com/WaffleLapkin/typenum into WaffleLapkin-const_assert_ty_eq (Paho Lurie-Gregg) #152
    • [87f87e8]: Merge branch 'WaffleLapkin-const_assert_ty_eq' (Paho Lurie-Gregg)
    • [80fbdeb]: Merge branch 'main' of github.com:paholg/typenum (Paho Lurie-Gregg)
    • [f4305c3]: Merge branch '2018-edition' of git://github.com/jerry73204/typenum into jerry73204-2018-edition (Paho Lurie-Gregg) #156
    • [1043b4c]: Merge branch 'jerry73204-2018-edition' (Paho Lurie-Gregg)
    • [b62d84b]: Run fmt on nightly (Paho Lurie-Gregg)
    • [98a8903]: Merge branch 'zero-marker' of git://github.com/jerry73204/typenum into jerry73204-zero-marker (Paho Lurie-Gregg) #137
    • [51554a6]: Merge branch 'jerry73204-zero-marker' (Paho Lurie-Gregg)
    • [932263f]: Update changelog (Paho Lurie-Gregg)
    • [72f4f52]: Merge branch 'float_to_neg_exp' of git://github.com/WaffleLapkin/typenum into WaffleLapkin-float_to_neg_exp (Paho Lurie-Gregg) #151
    • [4baa893]: Add inline to powi (Paho Lurie-Gregg)
    • [f8845f9]: Merge branch 'WaffleLapkin-float_to_neg_exp' (Paho Lurie-Gregg)
    • [e27c19f]: Merge branch 'license-clarification' (Paho Lurie-Gregg)
    • [7e3a878]: Build on all OSes (#166) (Paho Lurie-Gregg) #166
    • [98a1fd4]: Merge branch 'feature-to-arbitrary-int' of git://github.com/jerry73204/typenum into jerry73204-feature-to-arbitrary-int (Paho Lurie-Gregg) #135
    • [51882b8]: Merge branch 'jerry73204-feature-to-arbitrary-int' (Paho Lurie-Gregg)
    • [39eedb7]: Update changelog (Paho Lurie-Gregg)
    • [83a09af]: linewrap md files at 80 (Paho Lurie-Gregg) #167
    • [a394b35]: Add publish action (Paho Lurie-Gregg) #167
    • [104e009]: Update version to 1.13 (Paho Lurie-Gregg) #168
    Open source →
    Release notes
    • [changed] MSRV from 1.22.0 to 1.37.0.
    • [fixed] op macro with 2018 edition import.
    • [changed] Allowed calling assert_type_eq and assert_type at top level.
    • [added] Marker trait Zero for Z0, U0, and B0.
    • [added] Implementation of Pow trait for f32 and f64 with negative exponent.
    • [added] Trait ToInt.
    Open source →
  10. 1.12.0 14 Apr 2020
    Release notes
    • [added] Feature force_unix_path_separator to support building without Cargo.
    • [added] Greatest common divisor operator Gcd with alias Gcf.
    • [added] gcd to the op! macro.
    • [changed] Added Copy bound to Rhs of Mul<Rhs> impl for <TArr<V, A>.
    • [changed] Added Copy bound to Rhs of Div<Rhs> impl for <TArr<V, A>.
    • [changed] Added Copy bound to Rhs of PartialDiv<Rhs> impl for <TArr<V, A>.
    • [changed] Added Copy bound to Rhs of Rem<Rhs> impl for <TArr<V, A>.
    • [fixed] Make all functions #[inline].
    Open source →
  11. 1.11.2 26 Aug 2019
    Release notes
    • [fixed] Cross compilation from Linux to Windows.
    Open source →
  12. 1.11.1 26 Aug 2019
    Release notes
    • [fixed] Builds on earlier Rust builds again and added Rust 1.22.0 to Travis to prevent future breakage.
    Open source →
  13. 1.11.0 25 Aug 2019
    Release notes
    • [added] Integer log2 to the op! macro.
    • [added] Integer binary logarithm operator Logarithm2 with alias Log2.
    • [changed] Removed feature(i128_type) when running with the i128 feature. Kept the feature flag. for typenum to maintain compatibility with old Rust versions.
    • [added] Integer sqrt to the op! macro.
    • [added] Integer square root operator SquareRoot with alias Sqrt.
    • [fixed] Bug with attempting to create U1024 type alias twice.
    Open source →
  14. 1.10.0 11 Mar 2018
    Release notes
    • [added] The PowerOfTwo marker trait.
    • [added] Associated constants for Bit, Unsigned, and Integer.
    Open source →
  15. 1.9.0 14 May 2017
    Release notes
    • [added] The Abs type operator and corresponding AbsVal alias.
    • [added] The feature i128 that enables creating 128-bit integers from typenums.
    • [added] The assert_type! and assert_type_eq! macros.
    • [added] Operators to the op! macro, including those performed by cmp!.
    • [fixed] Bug in op! macro involving functions and convoluted expressions.
    • [deprecated] The cmp! macro.
    Open source →
  16. 1.8.0 13 Apr 2017
    Release notes
    • [added] The op! macro for conveniently performing type-level operations.
    • [added] The cmp! macro for conveniently performing type-level comparisons.
    • [added] Some comparison type-operators that are used by the cmp! macro.
    Open source →
  17. 1.7.0 25 Mar 2017
    Release notes
    • [added] Type operators Min and Max with accompanying aliases Minimum and Maximum
    Open source →
  18. 1.6.0 24 Feb 2017
    Release notes
    • [fixed] Bug in Array division.
    • [fixed] Bug where Rem would sometimes exit early with the wrong answer.
    • [added] PartialDiv operator that performs division as a partial function -- it's defined only when there is no remainder.
    Open source →
  19. 1.5.2 04 Feb 2017
    Release notes
    • [fixed] Bug between Div implementation and type system.
    Open source →
  20. 1.5.1 08 Nov 2016
    Release notes
    • [fixed] Expanded implementation of Pow for primitives.
    Open source →
  21. 1.5.0 03 Nov 2016
    Release notes
    • [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 impl for Pow. I would be very surprised if that is anyone other than me.
    Open source →
  22. 1.4.0 29 Oct 2016
    Release notes
    • [added] Type-level arrays of type-level integers. (PR #66)
    • [added] The types in this crate are now instantiable. (Issue #67, PR #68)
    Open source →
  23. 1.3.2 08 Jul 2016

    Nothing published for this version

  24. 1.3.1 01 Apr 2016
    Release notes
    • [fixed] Bug with recent nightlies.
    Open source →
  25. 1.3.0 07 Feb 2016
    Release notes
    • [changed] Removed dependency on libstd. (Issue #53, PR #55)
    • [changed] Reorganized module structure. (PR #57)
    Open source →
  26. 1.2.0 03 Jan 2016
    Release notes
    • [added] This change log!
    • [added] Convenience type aliases for operators. (Issue #48, PR #50)
    • [added] Types in this crate now derive all possible traits. (Issue #42, PR #51)
    Open source →
  27. 1.1.0 24 Nov 2015

    Nothing published for this version

  28. 1.0.2 20 Nov 2015

    Nothing published for this version

  29. 1.0.1 19 Oct 2015

    Nothing published for this version

  30. 1.0.0 19 Oct 2015

    Nothing published for this version

  31. 0.1.1 16 Oct 2015

    Nothing published for this version

  32. 0.1.0 12 Oct 2015

    Nothing published for this version

  33. 0.0.2 05 Oct 2015

    Nothing published for this version

  34. 0.0.1 26 Sep 2015

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive