[package]
name = "alphabet_detector"
version = "0.9.2"
authors = { workspace = true }
description = "Natural language alphabet detection library"
documentation = "https://docs.rs/alphabet_detector/"
repository = { workspace = true }
categories = ["text-processing"]
keywords = ["language", "match", "split", "word", "unicode"]
include = ["src"]
readme = "README.md"
license = { workspace = true }
edition = { workspace = true }

[workspace.package]
authors = ["Dmitry Rodionov <gh@rdmtr.com>"]
repository = "https://github.com/RoDmitry/alphabet_detector"
license = "MIT OR Apache-2.0"
edition = "2021"

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

[profile.dev]
opt-level = 1

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

[[bin]]
name = "cli_alphabet_intersection"
required-features = ["cli_alphabet_intersection"]

[workspace]
members = ["macros"]

[dependencies]
ahash = "0.8"
alphabet_detector_macros = { path = "macros", version = "0.5" }
concat_const = "0.2"
debug_unsafe = "0.1"
icu_normalizer = "2.0.0-beta2"
serde = { version = "1", features = ["derive"] }
strum = "0.27"
strum_macros = "0.27"

# optional
clap = { version = "4", features = ["derive"], optional = true }
compact_str = { version = "0.9", optional = true }
pyo3 = { version = "0.27", optional = true }
threadpool = { version = "1", optional = true }

[dev-dependencies]
rstest = "0.26"
serde_json = "1"

[features]
cli_alphabet_intersection = ["files_read", "clap", "threadpool"]
compact_str = ["dep:compact_str"]
files_read = []
python = ["pyo3"]
test_chars = []
