Skip to content

Repository files navigation

diff_viz

CI CodeQL License: MIT Rust 1.95+ PRs Welcome

Support Tinkora on Ko-fi

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 · 中文说明

Features

  • Side-by-side diff: Compare the original and modified inputs in parallel.
  • Unified diff view: Inspect a standard diff -u style 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.

🚀 Quick Start

# 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 8080

Open http://localhost:8080 in your browser.

📂 Project Structure

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)

🔧 Development

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_web

📄 Docs

🤝 Community

📜 License

MIT © Tinkora contributors

About

Local-first text, code, JSON, and unified patch diff workspace powered by Rust/WASM.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages