diffs-rs 0.1.1

Fast terminal diff viewer and embeddable Rust diff engine
Documentation
[package]
name = "diffs-rs"
version = "0.1.1"
edition = "2024"
rust-version = "1.88"
description = "Fast terminal diff viewer and embeddable Rust diff engine"
license = "Apache-2.0"
repository = "https://github.com/plannotator/diffs-rs"
readme = "README.md"
keywords = ["diff", "patch", "terminal", "tui", "ratatui"]
categories = ["command-line-utilities", "development-tools", "text-processing"]
# Ship only what the library and binary need to build, plus the docs a reader
# of the crate needs. Tests, fixtures, tools, reports and the forked crates in
# crates/ (published separately) stay out of this package.
include = [
    "/src/**/*.rs",
    "/build.rs",
    "/assets/pierre/**",
    "/examples/embedded_viewer.rs",
    "/Cargo.toml",
    "/Cargo.lock",
    "/README.md",
    "/CHANGELOG.md",
    "/docs/embedding.md",
    "/LICENSE",
    "/NOTICE.md",
]

[features]
default = ["clipboard", "dev-tty"]
clipboard = ["dep:arboard"]
# Read keyboard input from /dev/tty, so the standalone viewer works when the
# patch arrives on stdin. Embedding hosts that own their own input can turn
# this off with `default-features = false`.
dev-tty = ["crossterm/use-dev-tty"]
delivery-trace = ["syntect/syntax-timing"]
regex-census = ["syntect/regex-census"]
owner-census = ["regex-census", "syntect/owner-census"]

# The patched dependencies are forks published as their own crates from
# crates/. Each keeps its upstream dependency name, so `syntect::`,
# `two_face::` and `fancy_regex::` paths in this crate resolve to the forks.
[workspace]
members = ["crates/diffs-fancy-regex", "crates/diffs-syntect", "crates/diffs-two-face"]

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

[dependencies]
anyhow = "1.0"
clap = { version = "4.6", features = ["derive"] }
crossterm = "0.29"
git2 = { version = "0.21", default-features = false, features = ["vendored-libgit2"] }
hashbrown = { version = "0.16.1", default-features = false }
libc = "0.2"
memchr = "2.8"
nix = { version = "0.28", default-features = false, features = ["fs", "poll"] }
palette = "0.7"
ratatui = { version = "0.30.2", default-features = false, features = ["crossterm"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
signal-hook = "0.3"
similar = "3.2"
syntect = { package = "diffs-syntect", version = "0.1.0", path = "crates/diffs-syntect", default-features = false, features = ["default-fancy", "shared-engines"] }
tempfile = "3"
two-face = { package = "diffs-two-face", version = "0.1.0", path = "crates/diffs-two-face", default-features = false, features = ["syntect-fancy"] }
unicode-segmentation = "1.13"
unicode-width = "0.2"

[target.'cfg(target_os = "macos")'.dependencies]
arboard = { version = "3.6.1", default-features = false, optional = true }

[dev-dependencies]
fancy-regex = { package = "diffs-fancy-regex", version = "0.1.0", path = "crates/diffs-fancy-regex" }
portable-pty = "0.9"
vt100 = "0.16"

[profile.release]
lto = "thin"
codegen-units = 1

[lints.rust]
unsafe_code = "forbid"

[lints.clippy]
all = "warn"