mbr-markdown-browser 0.4.7

A fast, featureful markdown viewer, browser, and (optional) static site generator
[package]
name = "mbr-markdown-browser"
version = "0.4.7"
edition = "2024"
rust-version = "1.91"
authors = ["Patrick Walsh <pwalsh@well.com>"]
license = "GPL-3.0-or-later"
readme = "README.md"
description = "A fast, featureful markdown viewer, browser, and (optional) static site generator"
homepage = "https://github.com/zmre/mbr-markdown-browser/"
repository = "https://github.com/zmre/mbr-markdown-browser/"
documentation = "https://zmre.github.io/mbr-markdown-browser/"
keywords = ["markdown", "gui", "cli", "productivity", "static"]
categories = ["command-line-utilities", "gui", "template-engine"]
build = "build.rs"
autobenches = false

include = [
    "src/**/*",
    "build.rs",
    "templates/**/*",
    "mbr-icon.png",
    "/LICENSE",
    "/README.md",
]

[lib]
crate-type = ["lib", "staticlib"]
name = "mbr"
bench = false

[features]
default = ["gui", "media-metadata"]
# GUI feature enables native window/browser functionality (wry, tao, muda, rfd)
# Disable for QuickLook builds: cargo build --release --no-default-features
gui = ["dep:wry", "dep:tao", "dep:muda", "dep:rfd"]
# Media metadata extraction (requires ffmpeg, pdfium) - disable for QuickLook to avoid SDL dependency
media-metadata = ["dep:metadata", "dep:ffmpeg-next", "dep:pdfium-render"]
# Static ffmpeg linking for (remove runtime ffmpeg dependency)
ffmpeg-static = ["ffmpeg-next/static", "metadata/static"]
# FFI for QuickLook extension - only needed when building the staticlib
ffi = ["dep:uniffi"]

[dependencies]
# winit = "0.30.11"
axum = { version = "0.8", features = ["http1", "http2", "json", "tokio", "tracing", "ws"] }
chrono = { version = "0.4", default-features = false, features = ["std", "clock"] }
clap = { version = "4.5", features = ["derive"] }
figment = { version = "0.10", features = ["toml", "env"] }
futures = "0.3.32"
futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
glob = "0.3.3"
notify = { version = "8.2", default-features = false, features = ["macos_fsevent"] }
html-escape = "0.2.13"
itertools = "0.14.0"
lru = "0.18"
metadata = { version = "0.1.10", optional = true } # Requires ffmpeg for video/audio metadata extraction
ffmpeg-next = { version = "7.1", optional = true }  # Direct dep to control log level (suppress warnings from metadata crate)
pdfium-render = { version = "0.8", optional = true, default-features = false, features = ["image", "pdfium_7350"] } # PDF cover; pdfium_7350 compatible with nixpkgs-25.11-darwin pdfium-binaries 7363
papaya = "0.2.4"
pathdiff = "0.2.3"
lopdf = { version = "0.40", default-features = false, features = ["rayon"] }
percent-encoding = "2.3"
pulldown-cmark = { version = "0.13", default-features = false, features = ["html", "simd"] }
pulldown-cmark-escape = { version = "0.11", default-features = false }
rayon = "1.11"
regex = "1.11"
reqwest = { version = "0.13", default-features = false, features = ["rustls", "json"] }
rustls = { version = "0.23", default-features = false, features = ["ring", "std"] }
webpki-roots = "1"
scraper = "0.26"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tera = { version = "1.20", features = ["preserve_order", "date-locale"] }
time = "0.3"
tokio = {version="1.51", features = ["rt-multi-thread", "macros", "sync", "time", "net", "fs", "io-util"]}
tokio-util = { version = "0.7", features = ["io"] }
tower = { version = "0.5", features = ["util"] }
tower-http = { version = "0.6", features = ["fs", "trace", "set-header", "compression-gzip"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
url = "2.5"
walkdir = "2.5"
thiserror = "2.0"
parking_lot = "0.12"
uniffi = { version = "0.31", features = ["cli", "bindgen"], optional = true }
yaml-rust2 = "0.11"
# GUI dependencies (optional, enabled by default "gui" feature)
wry = { version = "0.55", default-features = true, features = ["devtools", "fullscreen"], optional = true }

# Search functionality
nucleo-matcher = "0.3"
grep-regex = "0.1"
grep-searcher = "0.1"
pagefind = "1.5"
aho-corasick = "1.1"

# Image processing with minimal features (only needed formats)
image = { version = "0.25.8", default-features = false, features = ["png", "jpeg", "gif", "webp"] }
# GUI dependencies (optional, enabled by default "gui" feature)
tao = { version = "0.35.0", optional = true }
muda = { version = "0.19", optional = true }
rfd = { version = "0.17", optional = true }

[target.'cfg(target_os = "linux")'.dependencies]
muda = { version = "0.19", features = ["gtk", "libxdo"], optional = true }

[dev-dependencies]
criterion = { version = "0.8", features = ["async_tokio"] }
filetime = "0.2"
flate2 = "1.0"
proptest = "1.11"
tempfile = "3.27"

[build-dependencies]
uniffi = { version = "0.31", features = ["build"] }

[[bin]]
name = "mbr"
path = "src/main.rs"
bench = false

[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"
required-features = ["ffi"]
bench = false

[profile.release]
opt-level = 3
lto = true
codegen-units = 16
panic = 'abort'
strip = 'debuginfo'

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

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

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

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

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

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

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

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

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