const-decimal 0.4.0

Integer-backed decimals with constant precision
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "const-decimal"
version = "0.4.0"
authors = ["Oliver Chalk"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Integer-backed decimals with constant precision"
homepage = "https://github.com/OliverNChalk/const-decimal"
readme = "README.md"
keywords = [
    "decimal",
    "math",
    "finance",
]
categories = [
    "finance",
    "mathematics",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/OliverNChalk/const-decimal"

[features]
borsh = ["dep:borsh"]
malachite = ["dep:malachite"]
serde = ["dep:serde"]

[lib]
name = "const_decimal"
path = "src/lib.rs"

[[bench]]
name = "add"
path = "benches/add.rs"

[[bench]]
name = "div"
path = "benches/div.rs"

[[bench]]
name = "fpdec_comparison"
path = "benches/fpdec_comparison.rs"
harness = false

[[bench]]
name = "main"
path = "benches/main.rs"
harness = false

[[bench]]
name = "mul"
path = "benches/mul.rs"

[[bench]]
name = "sub"
path = "benches/sub.rs"

[[bench]]
name = "to_f64"
path = "benches/to_f64.rs"

[dependencies.borsh]
version = "1.8.0"
features = ["derive"]
optional = true

[dependencies.malachite]
version = "0.9"
optional = true

[dependencies.num-traits]
version = "0.2.19"

[dependencies.paste]
version = "1.0.15"

[dependencies.ruint]
version = "1.19.0"

[dependencies.serde]
version = "~1.0"
features = ["derive"]
optional = true

[dependencies.thiserror]
version = "2"

[dev-dependencies.criterion]
version = "0.8.2"

[dev-dependencies.expect-test]
version = "1.5.1"

[dev-dependencies.fpdec]
version = "0.14"

[dev-dependencies.malachite]
version = "0.9"

[dev-dependencies.proptest]
version = "1.11.0"

[lints.clippy]
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
disallowed_methods = "warn"
get_first = "allow"
inline-always = "allow"
match_bool = "allow"
missing_const_for_fn = "warn"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
needless-raw-string-hashes = "allow"
similar_names = "allow"
single_match_else = "allow"
struct_excessive_bools = "allow"
todo = "warn"
too_many_lines = "allow"
trivially_copy_pass_by_ref = "warn"

[lints.clippy.pedantic]
level = "warn"
priority = -1

[profile.paranoid]
debug-assertions = true
overflow-checks = true
inherits = "release"

[profile.performance]
lto = "fat"
codegen-units = 1
incremental = false
inherits = "release"

[profile.release]
opt-level = 3
debug = 2