obadh_engine 0.5.0

A linguistically accurate Roman to Bengali transliteration engine
Documentation
[package]
name = "obadh_engine"
version = "0.5.0"
edition = "2021"
rust-version = "1.82"
authors = ["NSS Sayom"]
description = "A linguistically accurate Roman to Bengali transliteration engine"
repository = "https://github.com/nsssayom/obadh_engine"
license = "MIT"
keywords = ["bengali", "transliteration", "linguistics", "i18n"]
categories = ["text-processing", "internationalization"]
exclude = [
    "/data/autocorrect/**",
    "/data/autosuggest/**",
    "/docs/**",
    "/tools/**",
    "/www/**",
    "/.gitmodules",
    "/Makefile",
    "/build.sh",
    "/init.sh",
]

[lib]
crate-type = ["rlib", "cdylib"]
path = "src/lib.rs"
bench = false

[[bin]]
name = "obadh"
path = "src/bin/obadh.rs"
bench = false
required-features = ["cli"]

[[bin]]
name = "tokenizer"
path = "src/bin/tokenizer.rs"
bench = false
required-features = ["cli"]

[[bin]]
name = "obadh-autocorrect"
path = "src/bin/obadh-autocorrect.rs"
bench = false
required-features = ["cli"]

[[bin]]
name = "obadh-autosuggest"
path = "src/bin/obadh-autosuggest.rs"
bench = false
required-features = ["cli"]

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

[dependencies]
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
fst = "0.4.7"

# CLI support
clap = { version = "=4.5.32", features = ["derive"], optional = true }

# WASM support
wasm-bindgen = { version = "0.2.87", optional = true }
serde-wasm-bindgen = { version = "0.5", optional = true }
web-sys = { version = "0.3.64", features = ["Window", "Performance"], optional = true }
console_error_panic_hook = { version = "0.1.7", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
memmap2 = "0.9"
sha2 = "0.10"
unicode-normalization = { version = "=0.1.25", optional = true }
zip = { version = "=5.1.1", default-features = false, features = ["deflate-flate2-zlib-rs"], optional = true }

[dev-dependencies]
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support", "rayon"] } # For benchmarking
wasm-bindgen-test = "0.3.37" # For testing WASM

[features]
default = []
cli = ["dep:clap", "dep:unicode-normalization", "dep:zip"]
wasm = [
    "dep:console_error_panic_hook",
    "dep:serde-wasm-bindgen",
    "dep:wasm-bindgen",
    "dep:web-sys",
]

[profile.release]
# Optimize for speed
opt-level = 3
lto = true
codegen-units = 1
strip = true

[profile.wasm-release]
inherits = "release"
lto = true
opt-level = 'z'  # Optimize for size for WASM
panic = 'abort'