# 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 = "cpufeatures"
version = "0.3.0"
authors = ["RustCrypto Developers"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
Lightweight runtime CPU feature detection for aarch64, loongarch64, and x86/x86_64 targets,
with no_std support and support for mobile targets including Android and iOS
"""
documentation = "https://docs.rs/cpufeatures"
readme = "README.md"
keywords = [
    "cpuid",
    "target-feature",
]
categories = [
    "hardware-support",
    "no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/RustCrypto/utils"

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

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

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

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

[target.'cfg(all(target_arch = "aarch64", target_os = "android"))'.dependencies.libc]
version = "0.2.155"
default-features = false

[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies.libc]
version = "0.2.155"
default-features = false

[target.'cfg(all(target_arch = "aarch64", target_vendor = "apple"))'.dependencies.libc]
version = "0.2.155"
default-features = false

[target.'cfg(all(target_arch = "loongarch64", target_os = "linux"))'.dependencies.libc]
version = "0.2.155"
default-features = false

[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"
manual_assert = "warn"
map_unwrap_or = "warn"
missing_errors_doc = "warn"
missing_panics_doc = "warn"
mod_module_files = "warn"
must_use_candidate = "warn"
needless_range_loop = "allow"
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"
unwrap_used = "warn"

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