# 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 = "crypto-bigint"
version = "0.7.5"
authors = ["RustCrypto Developers"]
build = false
exclude = [
    ".clippy.toml",
    ".codecov.yml",
    ".github",
    ".gitignore",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Pure Rust implementation of a big integer library which has been designed from
the ground-up for use in cryptographic applications. Provides constant-time,
no_std-friendly implementations of modern formulas using const generics.
"""
readme = "README.md"
keywords = [
    "arbitrary",
    "crypto",
    "bignum",
    "integer",
    "precision",
]
categories = [
    "algorithms",
    "cryptography",
    "data-structures",
    "mathematics",
    "no-std",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/RustCrypto/crypto-bigint"
resolver = "2"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[package.metadata.typos.default]
extend-ignore-re = ["([0-9A-Fa-f]{16,})"]

[features]
alloc = ["serdect?/alloc"]
default = ["rand_core"]
der = [
    "dep:der",
    "hybrid-array",
]
extra-sizes = []
getrandom = [
    "dep:getrandom",
    "rand_core",
]
rand_core = ["dep:rand_core"]
serde = ["dep:serdect"]
subtle = [
    "dep:subtle",
    "ctutils/subtle",
    "hybrid-array?/subtle",
]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[dependencies.cpubits]
version = "0.1"

[dependencies.ctutils]
version = "0.4"

[dependencies.der]
version = "0.8"
optional = true
default-features = false

[dependencies.getrandom]
version = "0.4"
features = ["sys_rng"]
optional = true

[dependencies.hybrid-array]
version = "0.4.12"
optional = true

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

[dependencies.rand_core]
version = "0.10"
optional = true
default-features = false

[dependencies.rlp]
version = "0.6"
optional = true
default-features = false

[dependencies.serdect]
version = "0.4"
optional = true
default-features = false

[dependencies.subtle]
version = "2.6"
optional = true
default-features = false

[dependencies.zeroize]
version = "1"
optional = true
default-features = false

[dev-dependencies.chacha20]
version = "0.10"
features = ["rng"]
default-features = false

[dev-dependencies.hex-literal]
version = "1"

[dev-dependencies.num-bigint]
version = "0.4"

[dev-dependencies.num-integer]
version = "0.1"

[dev-dependencies.num-modular]
version = "0.6"
features = [
    "num-bigint",
    "num-integer",
    "num-traits",
]

[dev-dependencies.rand_core]
version = "0.10"

[target."cfg(any(unix, windows))".dev-dependencies.criterion]
version = "0.7"
features = ["html_reports"]

[target."cfg(any(unix, windows))".dev-dependencies.proptest]
version = "1.11"

[lints.clippy]
borrow_as_ptr = "warn"
cast_lossless = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_precision_loss = "warn"
cast_sign_loss = "warn"
checked_conversions = "warn"
doc_markdown = "warn"
from_iter_instead_of_collect = "warn"
implicit_saturating_sub = "warn"
integer_division_remainder_used = "warn"
manual_assert = "warn"
many_single_char_names = "allow"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
panic_in_result_fn = "warn"
ptr_as_ptr = "warn"
redundant_closure_for_method_calls = "warn"
ref_as_ptr = "warn"
return_self_not_must_use = "warn"
semicolon_if_nothing_returned = "warn"
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
trivially_copy_pass_by_ref = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unwrap_in_result = "warn"

[lints.rust]
missing_copy_implementations = "warn"
missing_debug_implementations = "warn"
missing_docs = "warn"
trivial_casts = "warn"
trivial_numeric_casts = "warn"
unsafe_code = "deny"
unused_lifetimes = "warn"
unused_qualifications = "warn"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ['cfg(cpubits, values("16", "32", "64"))']

[profile.dev]
opt-level = 2
