[package]
name = "md-viewer"
version = "0.1.11"
edition = "2021"
rust-version = "1.80"
description = "Fast, lightweight markdown viewer for Linux with tabs, file explorer, and live reload"
license = "MIT"
repository = "https://github.com/aydiler/md-viewer"
homepage = "https://github.com/aydiler/md-viewer"
documentation = "https://github.com/aydiler/md-viewer#readme"
readme = "README.md"
keywords = ["markdown", "viewer", "egui", "linux", "desktop"]
categories = ["command-line-utilities", "gui", "visualization"]
exclude = [
    "docs/devlog/*",
    "screenshots/*",
    ".claude/*",
    "crates/*",
]

[dependencies]
# Core GUI framework - eframe re-exports egui
eframe = { version = "0.33", default-features = false, features = [
    "default_fonts",
    "glow",
    "wayland",
    "x11",
    "persistence",
    "accesskit",
] }
egui = { version = "0.33", features = ["accesskit"] }

# MCP bridge for E2E testing (optional, local dev only - not on crates.io)
# egui-mcp-bridge = { path = "/home/ahmet/dev/mcp/egui-mcp/crates/egui-mcp-bridge", optional = true }

# Markdown rendering with syntax highlighting (fork with typography support)
egui_commonmark_extended = { version = "0.23.0", features = [
    "better_syntax_highlighting",
    "svg",
    "svg_text",
    "load-images",
    "fetch",
    "mermaid",
    "math",
] }

# Image format support
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif"] }

# File operations
rfd = "0.17"
notify = "6.1"
notify-debouncer-mini = "0.4"
clap = { version = "4", features = ["derive"] }

# Performance
mimalloc = "0.1"

# Serialization for persistence
serde = { version = "1", features = ["derive"] }

# Logging
env_logger = "0.11"
log = "0.4"
regex = "1.12.2"

[features]
default = []
# mcp = ["dep:egui-mcp-bridge"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("mcp"))'] }

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true

[profile.release-dev]
inherits = "release"
opt-level = 2
lto = "thin"
codegen-units = 4

[patch.crates-io]
egui_commonmark_extended = { path = "crates/egui_commonmark/egui_commonmark" }
egui_commonmark_backend_extended = { path = "crates/egui_commonmark/egui_commonmark_backend" }
egui_commonmark_macros_extended = { path = "crates/egui_commonmark/egui_commonmark_macros" }
