# 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 = "encrust-core"
version = "0.3.2"
authors = ["Emil Taylor Bye <phptph@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Core functionality for the encrust crate"
readme = "README.md"
keywords = ["obfuscation"]
categories = ["no-std"]
license = "MIT"
repository = "https://github.com/emiltayl/encrust/"

[package.metadata.docs.rs]
all-features = true

[features]
all = [
    "std",
    "macros",
    "hashstrings",
]
default = [
    "std",
    "macros",
    "hashstrings",
]
hashstrings = ["dep:rapidhash"]
macros = []
std = [
    "rand/std",
    "rapidhash?/std",
    "zeroize/std",
]

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

[dependencies.rand]
version = "0.9.0"
features = [
    "small_rng",
    "alloc",
]
default-features = false

[dependencies.rapidhash]
version = "4.1.0"
optional = true
default-features = false

[dependencies.zeroize]
version = "1.6.0"
features = ["derive"]

[dev-dependencies.rand]
version = "0.9.0"
features = ["thread_rng"]
default-features = false

[lints.clippy]
allow_attributes_without_reason = "warn"
clone_on_ref_ptr = "warn"
create_dir = "warn"
dbg_macro = "warn"
deref_by_slicing = "warn"
empty_drop = "deny"
empty_enum_variants_with_brackets = "deny"
empty_structs_with_brackets = "deny"
error_impl_error = "deny"
redundant_type_annotations = "warn"
semicolon_inside_block = "warn"
undocumented_unsafe_blocks = "warn"
unnecessary_safety_comment = "warn"
unnecessary_safety_doc = "warn"
unneeded_field_pattern = "warn"

[lints.clippy.cargo]
level = "warn"
priority = 3

[lints.clippy.multiple_crate_versions]
level = "allow"
priority = 10

[lints.clippy.must_use_candidate]
level = "allow"
priority = 9

[lints.clippy.pedantic]
level = "warn"
priority = 2

[lints.rust]
macro_use_extern_crate = "deny"
missing-abi = "warn"
missing_docs = "warn"
missing_unsafe_on_extern = "warn"
non_ascii_idents = "deny"
redundant_imports = "warn"
unit_bindings = "warn"
unused_qualifications = "warn"
variant-size-differences = "warn"

[lints.rust.deprecated_safe]
level = "deny"
priority = 1
