# 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"
rust-version = "1.85"
name = "decimal-scaled"
version = "0.2.1"
build = "build.rs"
exclude = [
    ".github/",
    "bash.exe.stackdump",
    "research/",
    "tarpaulin.toml",
    "scripts/",
    "docs/benchmarks*.draft",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Const-generic base-10 fixed-point decimals (D9/D18/D38/D76/D153/D307) with integer-only transcendentals correctly rounded to within 0.5 ULP — exact at the type's last representable place. Deterministic across every platform; no_std-friendly."
homepage = "https://github.com/mootable/decimal-scaled"
documentation = "https://docs.rs/decimal-scaled/"
readme = "README.md"
keywords = [
    "decimal",
    "fixed-point",
    "deterministic",
    "no-std",
    "precision",
]
categories = [
    "mathematics",
    "no-std",
    "science",
    "finance",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/mootable/decimal-scaled"

[package.metadata.docs.rs]
features = [
    "std",
    "serde",
    "strict",
    "macros",
    "wide",
    "x-wide",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
alloc = []
bench-alt = []
d153 = []
d307 = []
d76 = []
default = [
    "std",
    "serde",
    "strict",
]
experimental-floats = []
fast = []
macros = ["dep:decimal_scaled_macros"]
rounding-ceiling = []
rounding-floor = []
rounding-half-away-from-zero = []
rounding-half-toward-zero = []
rounding-trunc = []
serde = ["dep:serde"]
std = ["alloc"]
strict = []
wide = [
    "d76",
    "d153",
]
x-wide = ["d307"]

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

[[test]]
name = "arithmetic_mode_aware"
path = "tests/arithmetic_mode_aware.rs"

[[test]]
name = "bitwise"
path = "tests/bitwise.rs"

[[test]]
name = "conversion_error_display"
path = "tests/conversion_error_display.rs"

[[test]]
name = "conversions"
path = "tests/conversions.rs"

[[test]]
name = "decimal_trait_default_methods"
path = "tests/decimal_trait_default_methods.rs"

[[test]]
name = "decimal_trait_generic_surface"
path = "tests/decimal_trait_generic_surface.rs"

[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"

[[test]]
name = "equalities"
path = "tests/equalities.rs"

[[test]]
name = "equalities_wide_branches"
path = "tests/equalities_wide_branches.rs"

[[test]]
name = "macros"
path = "tests/macros.rs"

[[test]]
name = "macros_bitwise_and_overflow"
path = "tests/macros_bitwise_and_overflow.rs"

[[test]]
name = "macros_int_and_conversions"
path = "tests/macros_int_and_conversions.rs"

[[test]]
name = "macros_num_traits"
path = "tests/macros_num_traits.rs"

[[test]]
name = "macros_pow"
path = "tests/macros_pow.rs"

[[test]]
name = "macros_surface"
path = "tests/macros_surface.rs"

[[test]]
name = "narrow_fast_transcendentals"
path = "tests/narrow_fast_transcendentals.rs"

[[test]]
name = "narrow_strict_transcendentals"
path = "tests/narrow_strict_transcendentals.rs"

[[test]]
name = "num_traits"
path = "tests/num_traits.rs"

[[test]]
name = "parse_errors"
path = "tests/parse_errors.rs"

[[test]]
name = "precision_strict_05_ulp"
path = "tests/precision_strict_05_ulp.rs"

[[test]]
name = "precision_wide_baseline"
path = "tests/precision_wide_baseline.rs"

[[test]]
name = "rescale"
path = "tests/rescale.rs"

[[test]]
name = "rescale_modes"
path = "tests/rescale_modes.rs"

[[test]]
name = "routing_surface"
path = "tests/routing_surface.rs"

[[test]]
name = "serde_surface"
path = "tests/serde_surface.rs"

[[test]]
name = "wide_constants_all_six"
path = "tests/wide_constants_all_six.rs"

[[test]]
name = "wide_constants_high_scale"
path = "tests/wide_constants_high_scale.rs"

[[test]]
name = "wide_roots_dispatcher_and_hypot"
path = "tests/wide_roots_dispatcher_and_hypot.rs"

[[test]]
name = "wide_strict_transcendentals"
path = "tests/wide_strict_transcendentals.rs"

[[test]]
name = "widen_narrow_default"
path = "tests/widen_narrow_default.rs"

[[bench]]
name = "agm_vs_taylor"
path = "benches/agm_vs_taylor.rs"
harness = false
required-features = ["x-wide"]

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

[[bench]]
name = "d_w128_mul_div_paths"
path = "benches/d_w128_mul_div_paths.rs"
harness = false
required-features = ["wide"]

[[bench]]
name = "decimal_backends"
path = "benches/decimal_backends.rs"
harness = false
required-features = ["wide"]

[[bench]]
name = "full_matrix"
path = "benches/full_matrix.rs"
harness = false
required-features = [
    "wide",
    "x-wide",
]

[[bench]]
name = "g_math_comparison"
path = "benches/g_math_comparison.rs"
harness = false
required-features = ["wide"]

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

[[bench]]
name = "wide_int_backends"
path = "benches/wide_int_backends.rs"
harness = false
required-features = ["wide"]

[dependencies.decimal_scaled_macros]
version = "0.2.1"
optional = true
default-features = false

[dependencies.num-traits]
version = "0.2"
default-features = false

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

[dev-dependencies.bnum]
version = "0.14"
default-features = false

[dev-dependencies.criterion]
version = "0.8"
features = [
    "cargo_bench_support",
    "html_reports",
]
default-features = false

[dev-dependencies.fixed]
version = "1"

[dev-dependencies.g_math]
version = "0.4"

[dev-dependencies.i256]
version = "0.2"
default-features = false

[dev-dependencies.postcard]
version = "1"
features = ["alloc"]
default-features = false

[dev-dependencies.ruint]
version = "1"
default-features = false

[dev-dependencies.rust_decimal]
version = "1"
features = ["maths"]
default-features = false

[dev-dependencies.serde_json]
version = "1"

[lints.clippy]
assertions_on_constants = "allow"
bool_assert_comparison = "allow"
bool_to_int_with_if = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
collapsible_if = "allow"
comparison_chain = "allow"
doc_lazy_continuation = "allow"
doc_markdown = "allow"
empty_line_after_outer_attr = "allow"
float_cmp = "allow"
format_push_string = "allow"
inline_always = "allow"
items_after_statements = "allow"
manual_assert = "allow"
manual_let_else = "allow"
many_single_char_names = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
nonminimal_bool = "allow"
result_unit_err = "allow"
return_self_not_must_use = "allow"
semicolon_if_nothing_returned = "allow"
should_panic_without_expect = "allow"
similar_names = "allow"
too_many_lines = "allow"
uninlined_format_args = "allow"
unreadable_literal = "allow"

[lints.rust]
dead_code = "allow"
unused_variables = "allow"
