1[package]
2name = "half"
3# Remember to keep in sync with html_root_url crate attribute
4version = "2.6.0"
5authors = ["Kathryn Long <squeeself@gmail.com>"]
6description = "Half-precision floating point f16 and bf16 types for Rust implementing the IEEE 754-2008 standard binary16 and bfloat16 types."
7repository = "https://github.com/VoidStarKat/half-rs"
8readme = "README.md"
9keywords = ["f16", "bfloat16", "no_std"]
10license = "MIT OR Apache-2.0"
11categories = ["no-std", "data-structures", "encoding"]
12edition = "2021"
13rust-version = "1.81"
14exclude = [".git*", ".editorconfig", ".circleci"]
15
16[features]
17default = ["std"]
18std = ["alloc"]
19use-intrinsics = [] # Deprecated
20alloc = []
21rand_distr = ["dep:rand", "dep:rand_distr"]
22
23[dependencies]
24cfg-if = "1.0.0"
25bytemuck = { version = "1.4.1", default-features = false, features = [
26 "derive",
27], optional = true }
28serde = { version = "1.0", default-features = false, features = [
29 "derive",
30], optional = true }
31num-traits = { version = "0.2.16", default-features = false, features = [
32 "libm",
33], optional = true }
34zerocopy = { version = "0.8.23", default-features = false, features = [
35 "derive",
36], optional = true }
37rand = { version = "0.9.0", default-features = false, features = [
38 "thread_rng",
39], optional = true }
40rand_distr = { version = "0.5.0", default-features = false, optional = true }
41rkyv = { version = "0.8.0", optional = true }
42arbitrary = { version = "1.4.1", features = ["derive"], optional = true }
43
44[target.'cfg(target_arch = "spirv")'.dependencies]
45crunchy = "0.2.2"
46
47[dev-dependencies]
48criterion = "0.5"
49quickcheck = "1.0"
50quickcheck_macros = "1.0"
51rand = "0.9.0"
52crunchy = "0.2.2"
53
54[[bench]]
55name = "convert"
56harness = false
57
58[package.metadata.docs.rs]
59rustdoc-args = ["--cfg", "docsrs"]
60all-features = true
61