diff_viz is a browser-native text and code diff workspace. Compare two inputs
side by side or as a unified patch, inspect JSON changes semantically, and apply
or export patches. Rust/WASM performs every operation locally in the browser.
Open the hosted workspace · 中文说明
- Side-by-side diff: Compare the original and modified inputs in parallel.
- Unified diff view: Inspect a standard
diff -ustyle representation. - JSON semantic diff: Compare keys and values instead of raw positions.
- Patch generation and apply: Export a unified patch or apply one locally.
- Three granularities: Lines, words, and characters.
- Privacy first: Input text stays in the browser and is never uploaded.
- Zero backend: The hosted page is static and can also be run offline.
# Clone
git clone https://github.com/Tinkora/diff_viz.git
cd diff_viz
# Build Web WASM
wasm-pack build --target web --release --out-dir "$PWD/crates/diff_viz_web/static/pkg" crates/diff_viz_web
# Launch the static page
cd crates/diff_viz_web/static && python3 -m http.server 8080Open http://localhost:8080 in your browser.
| Component | Description | Status |
|---|---|---|
diff_viz_core |
Diff algorithms, patch generation, JSON diff | ✅ |
diff_viz_web |
WASM bridge + HTML editor | ✅ |
skills/ |
Agent Skill definition (MCP tools) | ✅ |
cargo fmt --all -- --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
cargo check -p diff_viz_web --target wasm32-unknown-unknown
npm ci --ignore-scripts --prefix crates/diff_viz_web
npm run test:wasm-smoke:local --prefix crates/diff_viz_webMIT © Tinkora contributors