Interactive diff tool for SVG images.
Features
Swipe SVG graphics comparison with zoom and drag support.
Installation
If you're a Rust programmer, lukaj can be installed with cargo.
It supports two graphics backends which are enabled/disabled with
cargo features.
| Feature name | SVG library | 2D rendering library |
|---|---|---|
use-rsvg (default) |
librsvg | cairo |
use-usvg |
resvg | tiny-skia |
Depending on the operating system and selected feature set, lukaj will require additional development libraries.
-
When using default feature or both (with
cargo --all-features): -
When using only
use-usvgfeature:
-
Install MSYS2 and run from it's terminal run:
-
For default feature or both:
-
For
use-usvgfeature only:
-
-
Add mingw binaries path (
C:\msys64\mingw64\bin) to systemPath -
Change default rust toolchain to
stable-gnu -
Run cargo install command
-
For default feature or both:
-
For
use-usvgfeature only:
-
For different setups see this GUI development with Rust and GTK4 guide.
When running with only use-usvg feature see Rust-SDL2 readme
for different development options.
[!WARNING] Precompiled binaries or installation with package managers are not supported yet.
Usage
To compare two SVG files run:
$ lukaj [path 1] [path 2]
Lukaj uses following mouse/keyboard controls:
| Button | Action |
|---|---|
| Left Click | Move diff separator |
| Right Click | Move images |
| Scroll | Zoom in and out |
| R | Reset images position |
| Esc | Exit |
$ lukaj --help
Interactive diff tool for SVG images
Usage: lukaj [OPTIONS] [FILES]...
Arguments:
[FILES]... Files to compare
Options:
-s, --scale <VALUE> Sets a scaling factor
--backend <BACKEND> Preferred backend [default: rsvg-with-cairo]
[possible values: rsvg-with-cairo, usvg-with-skia]
-h, --help Print help
-V, --version Print version
Git integration
Lukaj can be used as git difftool.
To add git diff-svg custom command, copy and paste following sections to .gitconfig file:
[difftool "lukaj"]
cmd = ~/.cargo/bin/lukaj $LOCAL $REMOTE
[alias]
diff-svg = "difftool -t lukaj -y"