[workspace]
members = [".", "wasm", "ffi", "py", "jni"]
default-members = ["."]
resolver = "2"

[workspace.package]
version = "0.8.0"
edition = "2021"
license = "GPL-3.0-or-later"
authors = ["Kevin Labory <kevin@dyscolor.com>"]
repository = "https://github.com/kevinlabory/syllabify-fr"
rust-version = "1.85"

[package]
name = "syllabify-fr"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
rust-version.workspace = true
description = "Syllabification française pour l'apprentissage de la lecture — port de LireCouleur 6"
readme = "README.md"
keywords = ["french", "syllables", "phonology", "dyslexia", "reading"]
categories = ["text-processing", "science"]

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

[[bin]]
name = "syllabify"
path = "src/bin/cli.rs"
required-features = ["cli"]

[features]
default = ["regex-full", "cli"]
regex-full = ["dep:regex"]
regex-lite = ["dep:regex-lite"]
cli = ["regex-full", "dep:clap", "dep:clap_complete"]

[dependencies]
regex = { version = "1", optional = true }
regex-lite = { version = "0.1", optional = true }
clap = { version = "4", features = ["derive"], optional = true }
clap_complete = { version = "4", optional = true }

[dev-dependencies]
serde_json = "1"
criterion = { version = "0.5", features = ["html_reports"] }
proptest = "1"
assert_cmd = "2"
predicates = "3"

[profile.release]
lto = true
codegen-units = 1

# Dedicated optimization profile for the WASM crate: aggressive size tuning.
[profile.release.package.syllabify-fr-wasm]
opt-level = "z"

[[bench]]
name = "syllabify"
harness = false

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"
