configdiff-web

A browser playground for configdiff — the Rust semantic config-diff library compiled to WebAssembly. Paste two config files (TOML, YAML, JSON, INI, or .env), and see the semantic diff instantly, entirely client-side. No server, no upload — nothing leaves your machine.

▶ Live demo: https://nico-perales.github.io/configdiff-web/

configdiff-web comparing a TOML config against the YAML that replaced it, entirely in the browser

It compares by value and structure, not text: reordered keys don’t show up, and a number that silently became a string is flagged as a type change — across formats (e.g. an old config.toml vs the config.yaml that replaced it).

How it works

configdiff (Rust library)
      │  wasm-bindgen
      ▼
configdiff_web.wasm  ──▶  loaded by index.html (plain HTML/CSS/JS)  ──▶  runs in the browser

The Rust crate in src/lib.rs wraps configdiff::diff_str behind a single #[wasm_bindgen] function that returns the diff as JSON; the page renders it. The whole thing is static files served from GitHub Pages — the diff runs in your browser via WebAssembly, so it works offline once loaded.

Build locally

Requires a Rust toolchain and wasm-pack.

rustup target add wasm32-unknown-unknown
wasm-pack build --target web --out-dir web/pkg --release

Then serve the web/ directory over HTTP (module scripts and .wasm need a real server, not file://):

npx serve web

Deployment

Pushing to main triggers a GitHub Actions workflow (pages.yml) that builds the WebAssembly and deploys web/ to GitHub Pages. Enable it once under Settings → Pages → Source: GitHub Actions.

License

Licensed under either of Apache-2.0 or MIT at your option.