[package] name = "typed_floats" description = "Types for handling floats with type checking at compile time." version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true include = [ "Cargo.toml", "src/*.rs", "src/**/*.rs", "*.md", ] keywords.workspace = true categories.workspace = true readme = "./README.md" rust-version.workspace = true [features] default = ["std", "compiler_hints"] # follows each debug_assert! with core::hint::unreachable_unchecked compiler_hints = [] # Add the `serde` dependency to enable serialization and deserialization of the types. serde = ["dep:serde"] # Allow to switch between `std` and `no_std` environments. std = ["typed_floats_macros/std"] # Add the the `num-traits` dependency to have access to most math functions in `no_std` environments. libm = ["dep:num-traits", "typed_floats_macros/libm"] # Will `panic!` in release mode instead of risking undefined behavior. # This will override the `compiler_hints` feature, and adds a little overhead to `new_unchecked`. # This feature can be enabled by any parent crate to ensure no undefined behavior. ensure_no_undefined_behavior = [] [dependencies] [dependencies.typed_floats_macros] version = "=1.0.2" path = "../typed_floats_macros" [dependencies.serde] version = "1.0" default-features = false features = ["derive"] optional = true [dependencies.num-traits] version = "0.2" default-features = false features = ["libm"] optional = true [dev-dependencies] serde_json = { version = "1.0" } num-traits = "0.2" [package.metadata.docs.rs] features = ["serde"] [lints.clippy] cargo = { priority = -1, level = "deny" } complexity = { priority = -1, level = "deny" } correctness = { priority = -1, level = "deny" } suspicious = { priority = -1, level = "deny" } style = { priority = -1, level = "deny" } perf = { priority = -1, level = "deny" } pedantic = { priority = -1, level = "deny" } nursery = { priority = -1, level = "deny" } # restriction = { priority = -1, level = "deny" }