Cargo Features

[dependencies]
half = { version = "2.4.1", default-features = false, features = ["std", "use-intrinsics", "alloc", "rand_distr", "bytemuck", "serde", "num-traits", "zerocopy", "rkyv"] }
default = std

The std feature is set by default whenever half is added without default-features = false somewhere in the dependency tree.

std default = alloc

Affects slice::HalfFloatSliceExt.to_f32_vec

use-intrinsics

Deprecated

alloc std

Affects half::vec, slice::HalfFloatSliceExt.to_f64_vec, slice::HalfFloatSliceExt.to_f32_vec

rand_distr

Enables rand and rand_distr

Features from optional dependencies

bytemuck implicit feature

Enables bytemuck

bytemuck:

A crate for mucking around with piles of bytes

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

num-traits implicit feature

Enables num-traits

num-traits:

Numeric traits for generic mathematics

zerocopy implicit feature

Enables zerocopy ^0.6.0

zerocopy:

Zerocopy makes zero-cost memory manipulation effortless. We write "unsafe" so you don't have to.

rkyv implicit feature

Enables rkyv ^0.7

rkyv:

Zero-copy deserialization framework for Rust