[package]
name = "rumdl"
version = "0.0.223"
edition = "2024"
rust-version = "1.91.0"
description = "A fast Markdown linter written in Rust (Ru(st) MarkDown Linter)"
authors = ["Ruben J. Jongejan <ruben.jongejan@gmail.com>"]
license = "MIT"
repository = "https://github.com/rvben/rumdl"
homepage = "https://github.com/rvben/rumdl"
documentation = "https://github.com/rvben/rumdl/blob/main/docs"
readme = "README.md"
keywords = ["markdown", "linter", "markdown-linter", "static-analysis", "documentation"]
categories = ["command-line-utilities", "development-tools", "text-processing"]
exclude = [".github/", ".gitignore", "*.bak"]

[lib]
name = "rumdl_lib"
crate-type = ["cdylib", "rlib"]

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

[[bin]]
name = "rumdl"
path = "src/main.rs"

[profile.release]
lto = true           # Enable Link-Time Optimization
strip = true         # Strip symbols from binary
opt-level = "z"      # Optimize for size (alternative: "s" for small, "3" for speed)
codegen-units = 1    # Better optimization but slower compile times

[profile.profiling]
inherits = "release"
debug = true         # Keep debug symbols for profiling
strip = false        # Don't strip symbols
opt-level = 3        # Maximum optimization for realistic performance

[profile.perf-test]
inherits = "release"
lto = false          # Disable LTO for faster compilation
codegen-units = 16   # More parallel compilation
opt-level = 3        # Optimize for speed (not size)

[dependencies]
clap = { version = "4.5", features = ["derive"] }
colored = { version = "3.0.0", optional = true }
fancy-regex = "0.17.0"
ignore = "0.4.25"
itertools = "0.14"
rayon = { version = "1.11.0", optional = true }
serde = { version = "1.0", features = ["derive"] }
serde_yml = "0.0.12"
serde_json = { version = "1.0", features = ["preserve_order"] }
toml = "0.9"
thiserror = "2.0.17"
globset = "0.4.18"
indexmap = { version = "2", features = ["serde"] }
anyhow = "1.0"
log = "0.4.29"
pulldown-cmark = "0.13.0"
regex = "1.12"
toml_edit = "0.24"
dyn-clone = "1"
url = { version = "2", features = ["serde"] }
unicode-normalization = "0.1"
memmap2 = "0.9"
schemars = "1.1"
unicode-width = "0.2"
titlecase = "3"
memory-stats = { version = "1.2.0", optional = true }
phf = { version = "0.13", features = ["macros"] }

# LSP dependencies (native only)
tower-lsp = { version = "0.20", optional = true }
tokio = { version = "1.48", features = ["full"], optional = true }
tokio-util = { version = "0.7", optional = true }
tower = { version = "0.5.2", optional = true }
tower-service = { version = "0.3", optional = true }
env_logger = { version = "0.11", optional = true }
chrono = { version = "0.4", features = ["serde"], optional = true }
notify = { version = "8.2", optional = true }
etcetera = { version = "0.11", optional = true }
blake3 = { version = "1.8", optional = true }
postcard = { version = "1.1", features = ["alloc"], optional = true }

# WASM dependencies
wasm-bindgen = { version = "0.2", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }
js-sys = { version = "0.3", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
futures = { version = "0.3.31", features = ["alloc"] }

[features]
default = ["parallel", "native"]
parallel = ["rayon"]
profiling = []
native = [
    "tower-lsp",
    "tokio",
    "tokio-util",
    "tower",
    "tower-service",
    "env_logger",
    "chrono",
    "notify",
    "etcetera",
    "blake3",
    "postcard",
    "colored",
    "memory-stats",
]
wasm = ["wasm-bindgen", "console_error_panic_hook", "js-sys", "serde-wasm-bindgen"]

[dev-dependencies]
assert_cmd = "2.1.1"
predicates = "3.1.3"
tempfile = "3.23"
proptest = "1.9"
criterion = { version = "0.8", features = ["html_reports"] }
rand = "0.9.2"
pretty_assertions = "1.4"
unicode-segmentation = "1.12"
serial_test = "3.2"
jsonschema = "0.37"
ureq = "3.1"

[target.'cfg(all(not(target_env = "msvc"), not(target_arch = "wasm32")))'.dependencies]
tikv-jemallocator = "0.6"

[target.'cfg(all(target_env = "msvc", not(target_arch = "wasm32")))'.dependencies]
mimalloc = { version = "0.1", default-features = false }

[target.'cfg(unix)'.dependencies]
libc = "0.2"

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