[package]
name = "mlux"
version = "2.3.1"
authors = ["saka1"]
edition = "2024"
description = "A rich Markdown viewer for modern terminals"
license = "MIT"
repository = "https://github.com/saka1/mlux"
rust-version = "1.91"
keywords = ["markdown", "typst", "terminal", "viewer"]
categories = ["command-line-utilities"]
exclude = ["docs/", "fuzz/", "tests/", "fonts/NotoSansJP-*.ttf", "CLAUDE.md"]

[features]
default = ["embed-fonts"]
embed-fonts = []

[dependencies]
typst = "0.14"
typst-render = "0.14"
typst-kit = { version = "0.14", default-features = false, features = ["embed-fonts"] }
pulldown-cmark = "0.12"
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
anyhow = "1"
crossterm = { version = "0.28", features = ["use-dev-tty"] }
base64 = "0.22"
notify = "8"
open = "5"
regex = "1"
log = "0.4"
env_filter = "1"
zstd = "0.13"
mitex = "0.2"
mermaid-rs-renderer = { version = "0.2", default-features = false }
bincode = { version = "2", features = ["serde"] }
libc = "0.2"
nix = { version = "0.29", features = ["poll", "process", "signal"] }
ureq = "3"
git2 = { version = "0.20", default-features = false }
png = "0.18"
blake3 = "1"
tempfile = "3.27"

[target.'cfg(target_os = "linux")'.dependencies]
landlock = "0.4"

[build-dependencies]
zstd = "0.13"

# harness=false: these tests call fork(), which deadlocks under the default
# test harness because its thread pool leaves locked mutexes (heap allocator,
# etc.) in the forked child.  A custom main() runs them single-threaded.
[[test]]
name = "test_renderer"
harness = false

[lints.clippy]
all = { level = "deny", priority = -1 }
# Warns that `vec![1..3]` might be confused with `vec![1; 3]` (repeat syntax).
# In practice the types differ (Range vs integer), so a typo would be caught
# at compile time — false positive risk is negligible. Meanwhile, highlight and
# content_index tests frequently create single-element Range slices/vecs, and
# the workarounds (std::slice::from_ref, etc.) hurt readability more than they
# help. Allowed project-wide rather than scattering #[allow] annotations.
single_range_in_vec_init = "allow"

[profile.release]
strip = "debuginfo"
lto = "thin"
panic = "abort"
