# 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 = "2021"
rust-version = "1.89"
name = "gaze-recognizers"
version = "0.11.3"
build = false
exclude = [
    "assets/ner/*.onnx",
    "assets/ner/*.bin",
    "assets/ner/*.safetensors",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Built-in recognizers for Gaze"
homepage = "https://github.com/CertaMesh/gaze"
readme = "README.md"
keywords = [
    "pii",
    "gaze",
    "ner",
    "recognizers",
]
categories = ["text-processing"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/CertaMesh/gaze"

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

[features]
default = ["phone-parser"]
phone-parser = [
    "dep:phonenumber",
    "gaze-types/phone-parser",
]
runtime-candle = [
    "safety-net-kiji",
    "dep:candle-core",
    "dep:candle-onnx",
]
runtime-tract = [
    "safety-net-kiji",
    "dep:tract-onnx",
]
safety-net = []
safety-net-kiji = ["safety-net"]
safety-net-openai = ["safety-net"]
test-support = ["safety-net"]

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

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

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

[[test]]
name = "context_sensitivity_v0_6"
path = "tests/context_sensitivity_v0_6.rs"
required-features = ["test-support"]

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

[[test]]
name = "coverage_loop"
path = "tests/coverage_loop.rs"
required-features = ["phone-parser"]

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

[[test]]
name = "kiji_distilbert_subprocess"
path = "tests/kiji_distilbert_subprocess.rs"
required-features = [
    "safety-net-kiji",
    "test-support",
]

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

[[test]]
name = "locale_aware_trait"
path = "tests/locale_aware_trait.rs"
required-features = [
    "safety-net-kiji",
    "test-support",
]

[[test]]
name = "mock_safety_net"
path = "tests/mock_safety_net.rs"
required-features = ["test-support"]

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

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

[[test]]
name = "openai_filter_subprocess"
path = "tests/openai_filter_subprocess.rs"
required-features = ["safety-net-openai"]

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

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

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

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

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

[[bench]]
name = "runtime_comparison"
path = "benches/runtime_comparison.rs"
harness = false
required-features = ["safety-net-kiji"]

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

[dependencies.aho-corasick]
version = "1"

[dependencies.candle-core]
version = "0.10.2"
optional = true

[dependencies.candle-onnx]
version = "0.10.2"
optional = true

[dependencies.gaze-types]
version = "0.11.3"

[dependencies.hex]
version = "0.4"

[dependencies.ndarray]
version = "0.16"

[dependencies.ort]
version = "=2.0.0-rc.12"
features = [
    "ndarray",
    "std",
    "download-binaries",
    "tls-rustls",
]
default-features = false

[dependencies.phonenumber]
version = "0.3.9"
optional = true
default-features = false

[dependencies.regex]
version = "1"

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

[dependencies.serde_json]
version = "1"

[dependencies.sha2]
version = "0.10"

[dependencies.sha3]
version = "0.10"

[dependencies.thiserror]
version = "1"

[dependencies.tokenizers]
version = "0.22"
features = ["onig"]
default-features = false

[dependencies.tracing]
version = "0.1"

[dependencies.tract-onnx]
version = "=0.23.0-dev.5"
optional = true

[dependencies.unicode-normalization]
version = "0.1"

[dev-dependencies.criterion]
version = "0.5"

[dev-dependencies.serial_test]
version = "3"

[dev-dependencies.tempfile]
version = "3"
