Skip to content

v0.6.0

Latest

Choose a tag to compare

@github-actions github-actions released this 23 Oct 09:08

Rust Diffutils 0.6.0 Release:

We are happy to announce the release of Rust Diffutils 0.6.0 - a release focused on output compatibility, cmp on large files and project infrastructure.

On the diff side, three output formats moved closer to GNU: unified and context hunks are now merged when they are separated by up to twice the context size, the context format marks every line of a change block with !, and the side-by-side (-y) gutter marker sits in the middle of the gutter. These are small differences on screen, but they are exactly what makes a generated patch differ byte for byte from the one GNU produces.

cmp got faster and more capable: verbose byte printing no longer allocates (about 2.3x faster than before on large, completely different files), and --bytes / --ignore-initial are now 64-bit everywhere, so 32-bit systems can compare files beyond 4 GiB like GNU cmp does with large file support.

Around the code, the project grew up a lot this cycle: we now run the upstream GNU diffutils test suite in CI and track its results on every pull request, we have Divan benchmarks tracked by CodSpeed, a security audit workflow, a SECURITY.md, pre-commit hooks, and a wasm32-wasip1 build in CI.

We are now at 7 passing, 22 failing, 4 skipped on the GNU test suite.


GNU Test Suite Compatibility:

Result 0.6.0 % Total 0.6.0
Pass 7 21.21%
Skip 4 12.12%
Fail 22 66.67%
Error 0 0%
Total 33

Note: this is the first release with GNU test suite tracking (#217), so there is no 0.5.0 baseline to compare against. Many of the failing tests exercise options that are not implemented yet; they give us a clear list of what to work on next. The evolution is now tracked in uutils/diffutils-tracking, refreshed twice a day.


GNU testsuite evolution


Download diffutils 0.6.0

File Platform Checksum
diffutils-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
diffutils-x86_64-apple-darwin.tar.xz Intel macOS checksum
diffutils-x86_64-pc-windows-msvc.zip x64 Windows checksum
diffutils-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
diffutils-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum

Highlights:

  • diff Output Compatibility

    • Hunks separated by up to twice the context size are merged into one, like GNU (#306)
    • Context format (-c) marks every line of a change block with ! (#311)
    • Side-by-side (-y) places the gutter marker at the middle of the gutter (#277)
  • cmp Improvements

    • Verbose byte printing (-l, -b) no longer allocates: ~2.3x faster than 0.5.0 on large, fully different files (#153)
    • --bytes and --ignore-initial are now u64, lifting the 4 GiB limit on 32-bit systems (#183)
    • Checked subtraction for the verbose offset padding (#275)
  • GNU Compatibility & Robustness

    • Unknown options are reported as unrecognized option, in the same format as GNU (#179, #180)
    • Fixed a panic on a non-UTF-8 argument ending in --width=N (#250)
    • The multicall binary accepts prefixed names, so it can be installed as gdiff, uu-cmp, rust-diffutils, etc. (#231)
  • Testing & Benchmarking

    • The upstream GNU diffutils test suite runs in CI, with a PR comment showing regressions and fixes (#217, #278)
    • Divan benchmarks with continuous performance tracking on CodSpeed (#185, #189)
    • The integration tests validate patch and ed once with meaningful messages, and work with gpatch on macOS
  • Platform & Security

    • wasm32-wasip1 builds again and is now covered by CI (#215, #218)
    • Binaries are published from main (#163)
    • New SECURITY.md, COPYRIGHT file and a cargo audit workflow
  • Contributions: This release landed 92 pull requests from 13 new contributors


Call to Action:

Help us improve compatibility - Pick a failing GNU test and send a PR: github.com/uutils/diffutils
Sponsor us on GitHub to accelerate development: github.com/sponsors/uutils

What's Changed

diff

cmp

  • cmp: stop allocating for byte printing by @kov in #153
  • cmp: fix 32-bit usize overflow in test by @JustSoup312 in #173
  • cmp Feat: change data type for 'bytes' limit and 'ignore initial' to u64 by @GunterSchmidt in #183
  • cmp: use .map_err by @oech3 in #236
  • cmp.rs: simplify by .ok_or by @oech3 in #243
  • cmp: use checked subtraction for the verbose offset padding by @MsfPablo in #275

diffutils

  • fix: rename "Unknown option" to "unrecognized option" for diff and cmp by @Ryujiyasu in #179
  • fix: match GNU error format for unrecognized options by @Ryujiyasu in #180
  • support prefixed names by @oech3 in #231
  • diffutils: fix panic on non-UTF-8 argument ending in --width=N by @SAY-5 in #250

Testing

  • fix: create target directory in fuzz targets by @pocopepe in #219
  • tests: fix "old" names in generated patch files by @marc-hb in #224
  • tests: validate "patch" and "ed" commands once, print meaningful messages by @marc-hb in #226
  • tests: fix "gpatch --version" error message on mac by @marc-hb in #235

Performance & Benchmarks

Code Quality & Cleanup

CI & Build

  • Publish binary from main by @oech3 in #163
  • Use preinstalled rust, disable incremental build by @oech3 in #164
  • fuzzing.yml: Avoid non reusable cache generation by @oech3 in #170
  • Cargo.toml: Simplify profiles by @oech3 in #191
  • fix: follow redirects when fetching gnulib init.sh in upstream test suite by @kevinburkesegment in #202
  • *.yml: dedup env: by @oech3 in #204
  • actions: add security audit workflow by @xtqqczze in #210
  • feat: add GNU testsuite tracking workflows by @pocopepe in #217
  • ci: add .pre-commit-config.yaml by @cakebaker in #227
  • Make compare_test_results.py executable by @cakebaker in #230
  • CI: remove echo "/opt/homebrew/opt/gpatch/libexec/gnubin" >> "$GITHUB_PATH" by @marc-hb in #234
  • Bump cargo-dist from 0.30.3 to 0.33.0 by @cakebaker in #251
  • ci: make the GNU testsuite run and its PR comment resilient by @sylvestre in #278
  • fuzzing.yml: use prebuilt cargo-fuzz for faster CI by @oech3 in #297
  • GNU test: use tarball instead of git clone by @oech3 in #299
  • GnuTests.yml: use preinstalled Rust by @oech3 in #302
  • ci.yml: avoid full git clone by @oech3 in #303

Documentation

Platform Support

Dependency Updates

  • chore(deps): update rust crate assert_cmd to v2.1.2 by @renovate[bot] in #160
  • chore(deps): update rust crate chrono to v0.4.43 by @renovate[bot] in #161
  • chore(deps): update rust crate regex to v1.12.3 by @renovate[bot] in #166
  • chore(deps): update rust crate tempfile to v3.25.0 by @renovate[bot] in #167
  • chore(deps): update rust crate libfuzzer-sys to v0.4.12 by @renovate[bot] in #168
  • chore(deps): update rust crate predicates to v3.1.4 by @renovate[bot] in #169
  • chore(deps): update rust crate chrono to v0.4.44 by @renovate[bot] in #174
  • chore(deps): update rust crate tempfile to v3.26.0 by @renovate[bot] in #176
  • chore(deps): update moonrepo/setup-rust action to v1 by @renovate[bot] in #190
  • chore(deps): update rust crate assert_cmd to v2.2.0 by @renovate[bot] in #197
  • chore(deps): update rust crate tempfile to v3.27.0 by @renovate[bot] in #198
  • chore(deps): update rust crate divan to v4.4.0 by @renovate[bot] in #199
  • chore(deps): update rust crate divan to v4.4.1 by @renovate[bot] in #200
  • chore(deps): update rust crate itoa to v1.0.18 by @renovate[bot] in #203
  • chore(deps): update codecov/codecov-action action to v6 by @renovate[bot] in #205
  • chore(deps): update rust crates by @xtqqczze in #207
  • chore(deps): update rust crate rand to v0.10.1 by @renovate[bot] in #209
  • chore(deps): update softprops/action-gh-release action to v3 by @renovate[bot] in #211
  • chore(deps): update rust crate divan to v4.5.0 by @renovate[bot] in #213
  • chore(deps): update rust crate assert_cmd to v2.2.1 by @renovate[bot] in #214
  • chore(deps): update rust crate divan to v4.6.0 by @renovate[bot] in #221
  • chore(deps): update rust crate assert_cmd to v2.2.2 by @renovate[bot] in #228
  • chore(deps): update dawidd6/action-download-artifact action to v21 by @renovate[bot] in #229
  • chore(deps): update rust crate divan to v4.7.0 by @renovate[bot] in #233
  • chore(deps): update rust crate chrono to v0.4.45 by @renovate[bot] in #237
  • chore(deps): update rust crate libfuzzer-sys to v0.4.13 by @renovate[bot] in #238
  • chore(deps): update codecov/codecov-action action to v7 by @renovate[bot] in #240
  • chore(deps): update github artifact actions (major) - autoclosed by @renovate[bot] in #241
  • chore(deps): update rust crate regex to v1.12.4 by @renovate[bot] in #242
  • chore(deps): update actions/checkout action to v7 by @renovate[bot] in #249
  • chore(deps): update actions/cache action to v6 by @renovate[bot] in #252
  • chore(deps): update rust crate divan to v5 by @renovate[bot] in #253
  • chore(deps): update rust crate divan to v5.0.1 by @renovate[bot] in #254
  • Bump anyhow from 1.0.102 to 1.0.104 by @cakebaker in #256
  • chore(deps): update rust crate rand to v0.10.2 by @renovate[bot] in #257
  • chore(deps): update rust crate regex to v1.13.0 by @renovate[bot] in #258
  • chore(deps): update rust crate regex to v1.13.1 by @renovate[bot] in #263
  • chore(deps): update codspeedhq/action action to v5 by @renovate[bot] in #266
  • chore(deps): update dawidd6/action-download-artifact action to v23 by @renovate[bot] in #273
  • chore(deps): update dawidd6/action-download-artifact action to v24 by @renovate[bot] in #276
  • Bump getrandom from 0.4.2 to 0.4.3 by @cakebaker in #281
  • chore(deps): update rust crate divan to v5.0.2 by @renovate[bot] in #283
  • chore(deps): update rust crate rand to v0.10.3 by @renovate[bot] in #285
  • chore(deps): update dawidd6/action-download-artifact action to v25 by @renovate[bot] in #288
  • chore(deps): update dawidd6/action-download-artifact action to v26 by @renovate[bot] in #293
  • chore(deps): update dawidd6/action-download-artifact action to v27 by @renovate[bot] in #294
  • chore(deps): update rust crate divan to v5.0.3 by @renovate[bot] in #305
  • chore(deps): update rust crate divan to v6 by @renovate[bot] in #310

Version Management

New Contributors

Full Changelog: v0.5.0...v0.6.0