rustdiff 0.1.0

Semantic JSON & XML diff tool with a native GTK4 desktop UI
# Copyright 2026 the rustdiff authors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: GPL-3.0-or-later

[package]
name        = "rustdiff"
version     = "0.1.0"
edition     = "2024"
rust-version = "1.85"
authors     = ["digitalgex <jpajro@digitalgex.com>"]
description = "Semantic JSON & XML diff tool with a native GTK4 desktop UI"
license     = "GPL-3.0-or-later"
readme      = "README.md"
repository  = "https://github.com/jereok91/rustdiff"
homepage    = "https://github.com/jereok91/rustdiff"

# Maximo 5 keywords — las que la gente buscaria en crates.io
keywords    = ["json", "xml", "diff", "gtk4", "compare"]

# Solo slugs validos de https://crates.io/category_slugs
categories  = ["command-line-utilities", "development-tools", "gui"]

# ── Archivos a incluir en el .crate ─────────
# Solo lo necesario para compilar + metadata.
# Excluye tests, screenshots, CI, etc. para reducir tamano del paquete.
include = [
    "src/**/*.rs",
    "build.rs",
    "Cargo.toml",
    "Cargo.lock",
    "LICENSE",
    "README.md",
    "data/rustdiff.desktop",
    "data/icons/rustdiff.svg",
]

# ─────────────────────────────────────────────
# BINARIO PRINCIPAL
# ─────────────────────────────────────────────
[[bin]]
name = "rustdiff"
path = "src/main.rs"

# ─────────────────────────────────────────────
# DEPENDENCIAS DE BUILD (verificacion de libs del sistema)
# ─────────────────────────────────────────────
[build-dependencies]
pkg-config = "0.3"

# ─────────────────────────────────────────────
# DEPENDENCIAS DE PRODUCCION
# ─────────────────────────────────────────────
[dependencies]

# ── UI / GTK ─────────────────────────────────
gtk4        = { version = "0.9", features = ["v4_12"] }
libadwaita  = { version = "0.7", features = ["v1_5"] }
sourceview5 = "0.9"

# ── SERIALIZACION / PARSEO ───────────────────
serde      = { version = "1", features = ["derive"] }
serde_json = "1"
quick-xml  = { version = "0.36", features = ["serialize", "async-tokio"] }

# ── MOTOR DE DIFF ────────────────────────────
similar = { version = "2", features = ["text", "unicode"] }

# ── PERSISTENCIA (SQLite embebido) ───────────
rusqlite = { version = "0.31", features = ["bundled", "backup"] }

# ── ASYNC ────────────────────────────────────
tokio = { version = "1", features = [
    "rt",
    "rt-multi-thread",
    "fs",
    "time",
    "macros",
] }

# ── UTILIDADES ───────────────────────────────
dirs               = "5"
tracing            = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
thiserror          = "1"
anyhow             = "1"
notify-rust        = { version = "4", optional = true }

# ─────────────────────────────────────────────
# DEPENDENCIAS DE TEST
# ─────────────────────────────────────────────
[dev-dependencies]
pretty_assertions = "1"
arbitrary         = { version = "1", features = ["derive"] }

# ─────────────────────────────────────────────
# FEATURES
# ─────────────────────────────────────────────
[features]
default       = []
notifications = ["notify-rust"]

# ─────────────────────────────────────────────
# PERFIL RELEASE
# ─────────────────────────────────────────────
[profile.release]
opt-level     = 3
lto           = "thin"
codegen-units = 1
strip         = "symbols"
panic         = "abort"

# ─────────────────────────────────────────────
# PERFIL DE DESARROLLO
# ─────────────────────────────────────────────
[profile.dev]
opt-level   = 1
debug       = true
incremental = true

# ─────────────────────────────────────────────
# METADATA PARA EMPAQUETADO .deb
# ─────────────────────────────────────────────
[package.metadata.deb]
maintainer   = "jpajaro <jpajaro@digitalgex.com>"
copyright    = "2026, digitalgex"
license-file = ["LICENSE", "4"]
extended-description = """
RustDiff es un comparador semantico de JSON y XML.
Muestra las diferencias entre dos documentos de forma visual,
resaltando anadidos, eliminados y modificados con colores.
"""
depends  = "$auto, libgtk-4-1, libadwaita-1-0, libgtksourceview-5-0"
section  = "utils"
priority = "optional"
assets = [
    ["target/release/rustdiff", "usr/bin/",                                "755"],
    ["data/rustdiff.desktop",   "usr/share/applications/",                 "644"],
    ["data/icons/rustdiff.svg", "usr/share/icons/hicolor/scalable/apps/",  "644"],
]