rustdiff 0.1.6

Semantic JSON & XML diff tool with a native GTK4 desktop UI
docs.rs failed to build rustdiff-0.1.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

RustDiff

Crates.io License: GPL-3.0-or-later

Semantic JSON and XML diff tool with a native GTK4 + Libadwaita desktop UI.

Language: English | Espanol

Features

  • Semantic JSON and XML diff (objects, arrays, XML nodes, attributes, and text)
  • Side-by-side editors with syntax highlighting
  • Auto compare while typing (debounced) + manual compare
  • Difference table with filters and click-to-jump navigation
  • Export to .txt and styled .html
  • Session history stored in SQLite

Installation

1) Flatpak + Flathub (recommended for desktop users)

Install Flatpak:

# Arch / Manjaro
sudo pacman -S flatpak

# Fedora
sudo dnf install flatpak

# Ubuntu / Debian
sudo apt update && sudo apt install -y flatpak

# openSUSE
sudo zypper install flatpak

Enable Flathub:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Install and run RustDiff from Flathub:

flatpak install flathub com.digitalgex.RustDiff
flatpak run com.digitalgex.RustDiff

Update or remove:

flatpak update com.digitalgex.RustDiff
flatpak uninstall com.digitalgex.RustDiff

Notes:

  • If software centers do not show Flathub apps immediately, log out and back in.
  • If com.digitalgex.RustDiff is not available yet, build the Flatpak locally from this repo (see com.digitalgex.RustDiff.yaml).

2) One-command installer (Cargo + system deps)

curl -fsSL https://raw.githubusercontent.com/jereok91/rustdiff/main/install.sh | bash

3) Cargo install (from crates.io)

cargo install rustdiff

4) Debian package (.deb) and APT repository (PPA-style)

Install from a downloaded .deb (from GitHub Releases):

sudo apt install ./rustdiff_*.deb

Install from the GitHub-hosted APT repository:

curl -fsSL https://jereok91.github.io/rustdiff/KEY.gpg | sudo tee /usr/share/keyrings/rustdiff-archive-keyring.gpg >/dev/null
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/rustdiff-archive-keyring.gpg] https://jereok91.github.io/rustdiff stable main" | sudo tee /etc/apt/sources.list.d/rustdiff.list >/dev/null
sudo apt update
sudo apt install rustdiff

APT repository builds are currently published for amd64.

Remove the package and repository:

sudo apt remove rustdiff
sudo rm -f /etc/apt/sources.list.d/rustdiff.list /usr/share/keyrings/rustdiff-archive-keyring.gpg
sudo apt update

System requirements (source/Cargo builds)

Rust

Rust 1.85+ (edition 2024):

rustup update stable
rustc --version

Native libraries

RustDiff uses native GTK libraries. You need a C toolchain (gcc/clang, make, pkg-config) and GTK development packages.

# Arch / CachyOS / Manjaro
sudo pacman -S base-devel gtk4 libadwaita gtksourceview5

# Fedora
sudo dnf install gcc make pkgconf-pkg-config gtk4-devel libadwaita-devel gtksourceview5-devel

# Ubuntu / Debian (24.04+)
sudo apt install build-essential pkg-config libgtk-4-dev libadwaita-1-dev libgtksourceview-5-dev

# openSUSE
sudo zypper install gcc make pkg-config gtk4-devel libadwaita-devel gtksourceview5-devel

# macOS (experimental)
brew install pkgconf gtk4 libadwaita gtksourceview5

Verify required libs:

pkg-config --exists gtk4 && echo "gtk4: OK" || echo "gtk4: MISSING"
pkg-config --exists libadwaita-1 && echo "libadwaita: OK" || echo "libadwaita: MISSING"
pkg-config --exists gtksourceview-5 && echo "gtksourceview5: OK" || echo "gtksourceview5: MISSING"

Build and run

# Development
cargo run

# Open with two files
cargo run -- left.json right.json

# Optimized release binary
cargo build --release

Binary output:

target/release/rustdiff

Install local checkout:

cargo install --path .

Usage

# Open empty window
rustdiff

# Open two JSON files
rustdiff old_config.json new_config.json

# Open two XML files
rustdiff schema_v1.xml schema_v2.xml

Keyboard shortcuts

Shortcut Action
Ctrl+O Open file in left panel
Ctrl+Shift+O Open file in right panel
Ctrl+Enter Force compare
Ctrl+S Save session to history
Ctrl+E Export result as .txt
Ctrl+Shift+F Pretty-print both panels
Ctrl+H Toggle history panel

Data, config, and outputs

  • History DB: ~/.local/share/rustdiff/history.db
  • UI settings: ~/.config/rustdiff/settings.json
  • Export formats: plain text (.txt) and HTML (.html)

Tests

# Full test suite
cargo test

# Integration tests
cargo test --test parser_tests
cargo test --test diff_engine_tests

Flathub and packaging documentation

  • Flatpak manifest for local builds: com.digitalgex.RustDiff.yaml
  • Flathub submission files: flathub/com.digitalgex.RustDiff.yaml, flathub/cargo-sources.json
  • Flathub submission workflow: flathub/README.md
  • Screenshot requirements (AppStream/Flathub): data/screenshots/README.md
  • Debian/APT packaging and GitHub Actions setup: docs/DEBIAN_APT.md

Useful external references:

License

GPL-3.0-or-later