PackageTrack
Sign in Get early access

half

Half-precision floating point f16 and bf16 types for Rust implementing the IEEE 754-2008 standard binary16 and bfloat16 types.

2.7.1 424M downloads/mo #272 most downloaded on crates.io VoidStarKat/half-rs

What this package is like to depend on

Last release 10 months ago

14 Oct 2025

Release timing varies

gaps range from 8 days to 11 months

Some releases are documented

notes for 8 of 29 stable releases

4 versions withdrawn

withdrawn after publishing

10 years old

33 releases · first in 2016

2 releases in the last 12 months

see the full history below

Release timeline

33 releases · Mar 2016 to Oct 2025
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 33
  1. 2.7.1 14 Oct 2025
    Release notes

    Fixed

    • loongarch64 lsx hardware intrinsics for f16 conversions now enabled only under nightly cargo feature, fixing compile errors on stable Rust.
    Open source →
  2. 2.7.0 09 Oct 2025 withdrawn
    Release notes

    Changed

    • zerocopy is now a required dependency. The optional zerocopy crate feature is deprecated. This change is to ensure better code safety and prevent potential unsound behavior.
    • Git repository URL has changed due to GitHub user name change. Old URL is redirected.

    Added

    • New num-traits implementations: Signed for f16 and bf16. By @djsell.
    • loongarch64 lsx hardware intrinsic support for f16 conversions. By @heiher.
    • Implemented Weight trait from rand crate for f16 and bf16 with rand optional cargo feature. By @majian4work.

    Fixed

    • min and max incorrectly propagate NaN values when self is NaN. Fixes #126, by @mgottscho.
    • Suppressed warnings from new unnecessary_transmutes lint.

    Removed

    • doc_auto_cfg feature has been removed from docs.rs documentation due to removal of rust feature.
    Open source →
  3. 2.6.0 08 Apr 2025
    Release notes

    Changed

    • Fixed some incorrect minimum supported versions of dependencies that weren't caught due to
      improper Cargo.lock:
      • num-traits 0.2.14 -> 0.2.16
      • zerocopy 0.8.0 -> 0.8.23
      • arbitrary 1.3.2 -> 1.4.1

    Added

    • f16 and bf16 now implement Immutable and KnownLayout for zerocopy crate. By [@usamoi].
    Open source →
  4. 2.5.0 14 Mar 2025
    Release notes

    Changed

    • Updated optional dependencies to latest major versions:
      • zercopy 0.6 -> 0.8
      • rand 0.8 -> 0.9
      • rand_distr 0.4 -> 0.5
      • rkyv 0.7 -> 0.8
      • (dev) criterion 0.4 -> 0.5
    • Minimum supported Rust version has been changed to 1.81 due to above dependency updates.
    • Minor restructuring of included license file locations to be more consistent with crates ecosystem.

    Added

    • Added support for arbitrary crate. Fixes #110. By @FL33TW00D.
    • New num-traits implementations: FromBytes and ToBytes for f16 and bf16. By @kpreid.

    Fixed

    • Suppressed unexpected_cfg lint warnings on newer versions of stable Rust.
    • Resolved ambiguous rustdoc warnings due to new unstable f16 primitive in compiler.
    Open source →
  5. 2.4.1 06 Apr 2024
    Release notes

    Fixed

    • Missing macro import causing build failure on no_std + alloc feature set. Fixes #107.
    • Clippy warning on nightly rust.
    Open source →
  6. 2.4.0 26 Feb 2024
    Release notes

    Added

    • Optional rkyv support. Fixes #100, by @comath.
    • New num-traits implementations: AsPrimitive<f16> for bf16 and AsPrimitive<bf16> for
      f16, allowing lossy conversions between the two types. By @charles-r-earp.
    • Cargo.lock added to vcs as is now recommended for library crates.

    Fixed

    • Remove some unit NaN conversion sign tests due to non-deterministic hardware. Fixes #103.
    • Redundant import warnings on nightly Rust.
    Open source →
  7. 2.3.1 26 Jun 2023
    Release notes

    Fixed

    • Compile error on x86 (not x86_64) targets. Fixes #93.
    Open source →
  8. 2.3.0 24 Jun 2023 withdrawn
    Release notes

    Added

    • Support for Kani Rust Verifier. By @cameron1024.
    • Support for rand_distr::Distribution implementations behind rand_distr optional cargo feature. By @coreylowman.
    • Floating point formatting options in Display and Debug implementations. By @eiz.

    Changed

    • Breaking Change Minimum supported Rust version is now 1.70.
    • Breaking Change Minimum supported Rust version policy reverted to original policy of allowing minimum supported Rust version updates for minor releases instead of only major to avoid segmentation and allow optimizing hardware implementations without unnecessary major releases.
    • Hardware intrinsics/assembly is finally available on stable Rust, including using hardware feature detection (std only), including:
      • AArch64 now uses FP16 hardware instructions for conversions and math operations when available.
      • x86/x86-64 now uses F16C hardware instructions for conversions (but no math operations) when available. Fixes #54.

    Deprecated

    • use-intrinsics cargo feature no longer used. Hardware support will now always be used whenever possible. A future version may output deprecation warnings if this feature is enabled.

    Fixed

    • Improve code generation of leading_zeros functions by inlining. By @encounter.
    • Sum implementation of bf16 incorrectly performed product instead of sum. By @wx-csy.
    • Compile failed when serde cargo feature enabled but std not enabled.
    • Incorrect black boxing of benchmark tests.
    • Rustdoc cfg display on docs.rs not getting enabled.
    Open source →
  9. 2.2.1 09 Jan 2023
    Release notes

    Changed

    • Reduced unnecessary bounds checks for SIMD operations on slices. By @Shnatsel.
    • Further slice conversion optimizations for slices. Resolves #66.
    Open source →
  10. 2.2.0 31 Dec 2022

    Nothing published for this version

  11. 2.1.0 18 Jul 2022

    Nothing published for this version

  12. 2.0.0 21 Jun 2022

    Nothing published for this version

  13. 1.8.3 26 Feb 2024
    Release notes

    Fixed

    • Potential soundness issues resolved.
    Open source →
  14. 1.8.2 22 Oct 2021

    Nothing published for this version

  15. 1.8.1 21 Oct 2021 withdrawn

    Nothing published for this version

  16. 1.8.0 14 Oct 2021

    Nothing published for this version

  17. 1.7.1 17 Jan 2021

    Nothing published for this version

  18. 1.7.0 17 Jan 2021

    Nothing published for this version

  19. 1.6.0 10 May 2020

    Nothing published for this version

  20. 1.5.0 03 Mar 2020

    Nothing published for this version

  21. 1.4.1 10 Feb 2020

    Nothing published for this version

  22. 1.4.0 13 Oct 2019

    Nothing published for this version

  23. 1.3.1 04 Oct 2019

    Nothing published for this version

  24. 1.3.0 03 Oct 2018

    Nothing published for this version

  25. 1.2.0 03 Sep 2018

    Nothing published for this version

  26. 1.1.2 13 Jul 2018

    Nothing published for this version

  27. 1.1.1 25 Jun 2018 withdrawn

    Nothing published for this version

  28. 1.1.0 17 Mar 2018

    Nothing published for this version

  29. 1.0.2 13 Jan 2018

    Nothing published for this version

  30. 1.0.1 30 Aug 2017

    Nothing published for this version

  31. 1.0.0 03 Feb 2017

    Nothing published for this version

  32. 0.1.1 08 Jan 2017

    Nothing published for this version

  33. 0.1.0 18 Mar 2016

    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