An experimental Rust port of the diff2html library and CLI tool for generating HTML from diffs, built using Claude Code.
This repository contains code that was primarily written by an AI coding agent.
This project provides two crates:
diff2html- Core library for parsing unified diffs and generating HTMLdiff2html-cli- Command-line tool for converting diffs to HTML
- Parse unified diff format (git diff, GNU diff)
- Generate HTML output in line-by-line or side-by-side views
- Word-level or character-level diff highlighting
- Light, dark, and auto color schemes
- Line matching algorithms for better change visualization
- JSON output for integration with other tools
- Support for binary files, renames, copies, and mode changes
- Combined diff support (merge commits)
MIT License - see LICENSE for details.
This is a port diff2html by Rodrigo Fernandes:
- diff2html - Original TypeScript library
- diff2html-cli - Original CLI tool