[package]
authors = ["LongYinan <lynweklm@gmail.com>"]
edition = "2021"
name = "napi-pinyin"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
jieba-rs = "0.7"
napi = "3"
napi-derive = "3"
once_cell = "1"
pinyin = "0.10"
rayon = "1"

[target.'cfg(all(not(target_os = "linux"), not(target_family = "wasm")))'.dependencies]
mimalloc-safe = { version = "0.1" }

[target.'cfg(target_os = "linux")'.dependencies]
mimalloc-safe = { version = "0.1", features = ["local_dynamic_tls"] }

[build-dependencies]
napi-build = "2"

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