# 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.4.0"
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://mootable.github.io/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",
    "xx-wide",
    "dyn",
]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
alloc = []
bench-alt = []
d115 = []
d1232 = []
d153 = []
d230 = []
d307 = []
d462 = []
d57 = []
d616 = []
d76 = []
d924 = []
default = [
    "std",
    "serde",
    "strict",
]
dyn = []
experimental-floats = []
fast = []
macros = ["dep:decimal_scaled_macros"]
perf-trace = ["dep:tracing"]
rounding-ceiling = []
rounding-floor = []
rounding-half-away-from-zero = []
rounding-half-toward-zero = []
rounding-trunc = []
serde = ["dep:serde"]
std = ["alloc"]
strict = []
wide = [
    "d57",
    "d76",
    "d115",
    "d153",
    "d230",
]
x-wide = [
    "d307",
    "d462",
    "d616",
]
xx-wide = [
    "d924",
    "d1232",
]

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

[[example]]
name = "chart_gen"
path = "examples/chart_gen.rs"

[[example]]
name = "divbench"
path = "examples/divbench.rs"

[[example]]
name = "expbench"
path = "examples/expbench.rs"

[[example]]
name = "fast_vs_strict_ulp"
path = "examples/fast_vs_strict_ulp.rs"

[[example]]
name = "karabench"
path = "examples/karabench.rs"

[[example]]
name = "profile_atan_perfetto"
path = "examples/profile_atan_perfetto.rs"

[[example]]
name = "profile_exp"
path = "examples/profile_exp.rs"

[[example]]
name = "profile_exp_perfetto"
path = "examples/profile_exp_perfetto.rs"

[[example]]
name = "rounding_mode_probe"
path = "examples/rounding_mode_probe.rs"

[[example]]
name = "sqrtbench"
path = "examples/sqrtbench.rs"

[[example]]
name = "test_pi"
path = "examples/test_pi.rs"

[[example]]
name = "ulp_report"
path = "examples/ulp_report.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 = "d38_max_scale_log_panic"
path = "tests/d38_max_scale_log_panic.rs"

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

[[test]]
name = "d_unified_foundation"
path = "tests/d_unified_foundation.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 = "dyn_decimal"
path = "tests/dyn_decimal.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 = "from_str_wide"
path = "tests/from_str_wide.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 = "new_tiers_smoke"
path = "tests/new_tiers_smoke.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 = "rounding_mode_matrix"
path = "tests/rounding_mode_matrix.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_max_scale_cbrt_panic"
path = "tests/wide_max_scale_cbrt_panic.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 = "atan_inputs"
path = "benches/atan_inputs.rs"
harness = false
required-features = ["wide"]

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

[[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_common"
path = "benches/full_matrix_common.rs"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.tracing]
version = "0.1"
features = ["std"]
optional = true
default-features = false

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

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

[dev-dependencies.criterion]
version = "4.6.0"
features = [
    "cargo_bench_support",
    "html_reports",
]
default-features = false
package = "codspeed-criterion-compat"

[dev-dependencies.dashu-float]
version = "0.4"

[dev-dependencies.decimal-rs]
version = "0.1"

[dev-dependencies.fastnum]
version = "0.7"
features = ["std"]
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.plotters]
version = "0.3"
features = [
    "bitmap_backend",
    "bitmap_encoder",
    "line_series",
    "ttf",
]
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.scientific]
version = "0.5"

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

[dev-dependencies.tracing-chrome]
version = "0.7"

[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["std"]
default-features = false

[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"

[profile.release]
debug = 2
