cargo / typenum

typenum

cargo

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.

Audits

PE Patrick Elsen 2026-06-02

typenum@1.20.1 · 1 finding

typenum 1.20.1 is a #![no_std] library that encodes integers in the Rust type system for compile-time arithmetic, comparison, and bitwise operations. No build.rs, no proc macros, no unsafe (enforced via forbid(unsafe_code)), no runtime I/O, one optional dependency (scale-info). Code matches upstream VCS byte-for-byte; generated constants and ~1700 integration tests are checked in. One low-severity finding: CHANGELOG header advertises stale MSRV (1.37.0 vs. actual 1.41.0).

has-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignuses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe
PE Patrick Elsen 2026-05-27

typenum@1.20.0

typenum 1.20.0 is a compile-time type-level number library (UInt/PInt/NInt/TArr with trait-resolution arithmetic). #![forbid(unsafe_code)] + #![no_std]; the build script was removed in 1.18.0 and the generated code is checked in. 1743 generated integration tests. No findings; suitable for security-sensitive use.

algorithm-impl-boundsalgorithm-impl-correctalgorithm-impl-safealgorithm-impl-testeddatastructure-impl-boundsdatastructure-impl-correctdatastructure-impl-safedatastructure-impl-testedhas-binarieshas-build-exechas-fuzz-testshas-install-exechas-integration-testshas-property-testshas-unit-testsimpl-algorithmimpl-concurrencyimpl-cryptoimpl-datastructureimpl-interpreterimpl-jitimpl-parserimpl-protocolis-benignuses-concurrencyuses-cryptouses-environmentuses-execuses-filesystemuses-interpreteruses-jituses-networkuses-unsafe