tinyview 1.1.0

Ephemeral CLI WebView runtime
[package]
name = "tinyview"
version = "1.1.0"
edition = "2021"
# MSRV. Pinned to the highest `rust-version` declared across the resolved
# dependency graph (see `cargo metadata`). The effective floor is set by `wry`
# (the native WebView core; declares 1.77) and its transitive `time-core`
# (declares 1.88) — not by TinyView's own source. `wry` cannot be dropped or
# down-pinned without abandoning the native-WebView requirement (CLAUDE.md), so
# the MSRV tracks the dependency reality. Verified by the `msrv` CI job, which
# builds with exactly this toolchain. Bump policy: see README "MSRV policy".
rust-version = "1.88"
description = "Ephemeral CLI WebView runtime"
license = "MIT"
repository = "https://github.com/TakakiAraki09/tiny-view"
homepage = "https://github.com/TakakiAraki09/tiny-view"
documentation = "https://docs.rs/tinyview"
readme = "README.md"
keywords = ["webview", "cli", "preview", "ephemeral", "html"]
categories = ["command-line-utilities", "gui"]
# Keep the published crate lean and limited to what's needed to build the
# binary. Cargo packages every git-tracked file by default; the entries below
# strip dev-only docs, AI/agent workspace files, CI config, the human-readable
# `*.test.md` summaries, and repo meta that downstream `cargo install` users do
# not need. README/LICENSE are auto-included. Verified via `cargo package
# --list` / `cargo publish --dry-run`.
exclude = [
    ".claude/",
    ".github/",
    "docs/",
    "src/**/*.test.md",
    "CLAUDE.md",
]

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

[features]
# `e2e`: compiles the live-WebView self-test harness (src/e2e.rs) and the
# JS→native IPC bridge it needs to read back in-page JS behavior. NEVER enabled
# in production builds — keeping it behind a feature guarantees the bridge that
# violates the "no native bridge" security default (CLAUDE.md) is not present in
# the shipped binary. Run with: TINYVIEW_E2E_SELFTEST=1 cargo run --features e2e
e2e = []

[dependencies]
clap = { version = "4.6", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] }
# `transparent` feature enables true per-pixel transparency on macOS by calling
# WKWebView private APIs (`_drawsBackground`). PRD §9.9 requires this. Note this
# blocks App Store publication — fine for a CLI tool that isn't sandbox-targeted.
wry = { version = "0.55", features = ["transparent"] }
tao = "0.35"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = { version = "0.8", default-features = false, features = ["parse"] }
# `--watch` mode (PRD §9.10). Mini debouncer is intentionally chosen over
# the full one — TinyView only needs "did this file change?" with a 100ms
# trailing debounce, not rename correlation. 0.5.x is kept for API stability;
# it is no longer the MSRV-limiting dependency (the floor is now `wry` /
# `time-core` — see the `rust-version` note above). `notify` itself is consumed
# transitively via `notify_debouncer_mini::notify` re-export to avoid pulling
# two copies of notify into the binary.
notify-debouncer-mini = "0.5"

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

[target.'cfg(target_os = "macos")'.dependencies]
# Native menu bar so the standard macOS shortcuts work: Cmd+Q (quit),
# Ctrl+Cmd+F (fullscreen), Cmd+W (close), Cmd+M (minimize), Cmd+C/V/X/A (edit).
# We use only `muda`'s *predefined* items, which map to AppKit standard
# selectors and are dispatched via the NSMenu / responder chain — so they fire
# even while the WKWebView holds focus (direct key interception in the tao
# loop does not). macOS-target-only + `default-features = false` (drops the
# Linux `gtk`/`libxdo` features): zero impact on Windows/Linux builds, which
# keep their existing menu-less behavior. `muda` rides the same `objc2` stack
# tao already pulls; the only new code is a small `png`/`flate2` icon path
# (unused here) — verified to keep the binary well under the <10MB budget. See
# src/menu.rs for the rationale.
muda = { version = "0.19.2", default-features = false }

[dev-dependencies]
tempfile = "3"
# Integration-test driver for the real `tinyview` binary (issue #7). Used by
# tests/user_template_e2e.rs to exercise the user-template resolve→read→inject
# path end-to-end. dev-only, so it never touches the shipped binary size budget.
assert_cmd = "2"

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