1[package]
2name = "half"
3# Remember to keep in sync with html_root_url crate attribute
4version = "2.4.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/starkat99/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.70"
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.14", default-features = false, features = [
32 "libm",
33], optional = true }
34zerocopy = { version = "0.6.0", default-features = false, optional = true }
35rand = { version = "0.8.5", default-features = false, optional = true }
36rand_distr = { version = "0.4.3", default-features = false, optional = true }
37rkyv = { version = "0.7", optional = true }
38
39[target.'cfg(target_arch = "spirv")'.dependencies]
40crunchy = "0.2.2"
41
42[dev-dependencies]
43criterion = "0.4.0"
44quickcheck = "1.0"
45quickcheck_macros = "1.0"
46rand = "0.8.5"
47crunchy = "0.2.2"
48
49[[bench]]
50name = "convert"
51harness = false
52
53[package.metadata.docs.rs]
54rustdoc-args = ["--cfg", "docsrs"]
55all-features = true
56