[package]
name = "cmakefmt-rust"
version = "0.3.0"
edition = "2021"
description = "A fast, correct CMake formatter"
license = "MIT OR Apache-2.0"
repository = "https://github.com/cmakefmt/cmakefmt"
homepage = "https://github.com/cmakefmt/cmakefmt"
documentation = "https://cmakefmt.github.io/cmakefmt/"
readme = "README.md"
keywords = ["cmake", "formatter", "formatting", "cli", "developer-tools"]
categories = ["command-line-utilities", "development-tools"]
rust-version = "1.85"
include = [
  "/build.rs",
  "/Cargo.toml",
  "/LICENSE",
  "/LICENSES/Apache-2.0.txt",
  "/LICENSES/MIT.txt",
  "/README.md",
  "/src/**",
]

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

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

[features]
default = ["cli"]
lsp = ["lsp-server", "lsp-types"]
cli = [
  "lsp",
  "clap",
  "clap_complete",
  "clap_mangen",
  "schemars",
  "walkdir",
  "ignore",
  "rayon",
  "indicatif",
  "similar",
]

[dependencies]
pest = "2"
pest_derive = "2"
pretty = "0.12"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = { package = "serde_yaml_ng", version = "0.10" }
toml = "1.1.2"
thiserror = "2.0.18"
indexmap = { version = "2.13", features = ["serde"] }
regex = "1.12"
clap = { version = "4", features = ["derive"], optional = true }
clap_complete = { version = "4", optional = true }
clap_mangen = { version = "0.3.0", optional = true }
walkdir = { version = "2", optional = true }
ignore = { version = "0.4", optional = true }
rayon = { version = "1", optional = true }
indicatif = { version = "0.18", optional = true }
similar = { version = "3.0", optional = true }
schemars = { version = "^1.2", optional = true }
lsp-server = { version = "0.7", optional = true }
lsp-types = { version = "0.97", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"

[dev-dependencies]
insta = "1"
criterion = { version = "0.8.2", features = ["html_reports"] }
tempfile = "3"

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

[profile.release]
strip = "symbols"

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
