[package]
name = "phonetik"
version = "0.1.0"
edition = "2024"
description = "Phonetic analysis engine for English. Rhyme detection, stress scanning, meter analysis, and syllable counting with a 126K-word embedded dictionary."
license = "MIT"
repository = "https://github.com/Void-n-Null/phonetik"
keywords = ["phonetics", "rhyme", "prosody", "nlp", "linguistics"]
categories = ["text-processing", "algorithms"]
include = [
    "src/**/*.rs",
    "build.rs",
    "cmudict.dict",
    "Cargo.toml",
    "LICENSE",
]

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

[[bin]]
name = "phonetik-server"
path = "src/main.rs"
required-features = ["server"]

[features]
default = ["server"]
server = ["dep:axum", "dep:tokio", "dep:tower-http", "dep:tracing", "dep:tracing-subscriber", "dep:bytes"]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
parking_lot = "0.12"
flate2 = "1"

# Server-only dependencies (behind "server" feature)
axum = { version = "0.8", optional = true }
tokio = { version = "1", features = ["full"], optional = true }
tower-http = { version = "0.6", features = ["cors"], optional = true }
tracing = { version = "0.1", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
bytes = { version = "1", optional = true }

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true
panic = "abort"
