github uutils/coreutils 0.7.0

23 hours ago

Rust Coreutils 0.7.0 Release:

We are excited to announce the release of Rust Coreutils 0.7.0 — a performance-focused release with major optimizations across dozens of utilities, continued safety improvements replacing unsafe code with safe abstractions, and a comprehensive campaign to eliminate panics on write errors. We also contributed many patches upstream to GNU coreutils, and welcomed their feedbacks and supports, strengthening both projects!


GNU Test Suite Compatibility:

Result 0.6.0 0.7.0 Change 0.6.0 to 0.7.0 % Total 0.6.0 % Total 0.7.0 % Change 0.6.0 to 0.7.0
Pass 622 629 +7 96.28% 94.59% -1.69%
Skip 7 13 +6 1.08% 1.95% +0.87%
Fail 16 23 +7 2.48% 3.46% +0.98%
Error 1 0 -1 0.15% 0% -0.15%
Total 646 665 +19 (new tests)

Note: The GNU test reference was updated from 9.9 to 9.10, adding 19 new tests. While the pass percentage decreased due to these newly added tests, the absolute number of passing tests increased by 7 and errors were eliminated entirely. Work is ongoing to address the new test failures.


GNU testsuite evolution


Highlights:

  • GNU Compatibility & Upstream Contributions

    • 629 passing tests (+7 from 0.6.0), with 19 new tests added from the GNU 9.10 update
    • Updated GNU test reference from 9.9 to 9.10
    • Contributed numerous patches upstream to GNU coreutils, benefiting both projects
    • New GNU compatibility fixes across date, fmt, kill, ptx, numfmt, cksum, and more
    • Took over maintenance of num-prime, the primality testing library used by factor
  • Performance Overhaul

    • Faster hash maps: rustc-hash in ls, du, tsort, shuf, mv; foldhash in sort
    • unexpand/expand: ASCII fast-path, buffered reads — 14%+ gain in unexpand
    • shuf, split, sort, du: Reduced malloc allocations (+3–6% in du, +4% in shuf)
    • nl: Optimized with itoa and direct writing
    • true/false: Removed clap dependency, smaller binary, faster startup
    • uucore: Disabled signal setup in simple utilities for binary size and startup speed
  • Robustness: Eliminated /dev/full Panics

    • Fixed panics when stderr is /dev/full across 20+ utilities (echo, date, sort, expr, hostname, id, comm, pr, dircolors, and more)
    • Generic fix ensuring unrecognized options with 2>/dev/full do not abort
  • Safety & Code Quality

    • Replaced unsafe libc calls with safe nix crate wrappers in uucore (umask, mkdirat, and more) and mknod
    • Eliminated TOCTOU races in ln, tac, and install -D
    • rm: --preserve-root now works correctly on symlinks
    • MSRV updated to 1.88
  • Notable Bug Fixes

    • date: Extensive fixes — -u/-s/-d flags, timezone abbreviation lookup and DST, RFC-822 format, %+/%_ modifiers, --debug, locale date_fmt
    • cp: Readonly directories, -a/-z flags, special files, non-UTF-8 directory names
    • mv: Preserve symlinks during cross-device moves, handle FIFOs in directories
    • ls: Hyperlink OSC 8 format, dired reports, fd leak on deep recursion, invalid UTF-8 hidden files
    • sort: Collator panic in worker threads, scientific notation parsing
    • paste: Multi-byte delimiters, GNU escape sequences, bounded buffering
    • printf: %q shell quoting with control chars and quotes
    • ptx: -t/--typeset-mode, multibyte Unicode panic, GNU default behavior
    • numfmt: --debug flag, empty delimiter, null byte handling, error message formatting
    • cksum: SHAKE algorithms, --binary/--text/--tag errors
    • cut, tac, tail, tr, uniq, od, chroot, stat, mktemp, pr, readlink, ln, kill, nproc, rm, env, sync, fmt, factor, wc: Various GNU compatibility and correctness fixes
  • Platform Support

    • NetBSD and PowerPC build fixes
    • Windows: tac stdin piping, test -r/-w/-x, publish static *.exe binaries
    • WebAssembly: Publish *.wasm artifacts
    • stdbuf: Support libstdbuf in same directory as binary
    • NixOS test compatibility fix; added security audit workflow
  • Contributions: This release was made possible by 23 new contributors joining our community


Call to Action:

Help us translate - Contribute translations at Weblate
Sponsor us on GitHub to accelerate development: github.com/sponsors/uutils

What's Changed

cat

cksum

chroot

comm

  • comm /etc/pacman.conf /dev/null 2>/dev/full does not abort by @oech3 in #10746
  • date, comm, tty: Fixing handling output to dev/null by @ChrisDryden in #10888

coreutils

  • tests/misc/coreutils.sh: Fail with invalid binary name by @oech3 in #10258
  • coreutils: output expected error for unrecognized options by @ChrisDryden in #9869
  • coreutils: Let the name *utils valid by @oech3 in #10729
  • coreutils: Fix 2>/dev/full aborts & drop a sed for GnuTests by @oech3 in #10740
  • all: --typo 2>/dev/full does not abort by @oech3 in #10764
  • Add regression test for coreutils --list by @oech3 in #10858

cp

csplit

  • refactor(csplit): use &str slices for patterns by @xtqqczze in #11013
  • csplit: add benchmarks for line number and regex pattern splitting by @sylvestre in #10927

cut

date

  • date: fix -u flag to match GNU behavior for input parsing by @ChrisDryden in #10715
  • date: Fix format optional argument to capture all following parameters by @cerdelen in #10914
  • date: fix -s UTC conversion losing timezone offset by @yachi in #10828
  • date: fix RFC-822 format to always use English names by @sylvestre in #10932
  • date: bump parse_datetime & add test for leap-1 GNU test by @sylvestre in #10933
  • date: add tests to match GNU's by @sylvestre in #10939
  • date: fix double periods in Hungarian month abbreviations by @naoNao89 in #10945
  • date: fix subfmt-up1, fill-1, pct-pct, and invalid-high-bit-set tests / implement --debug by @sylvestre in #10940
  • date: use locale date_fmt instead of D_T_FMT for default format by @ChrisDryden in #10935
  • date: Fix Error message missing '+' for format string after valid d flag by @cerdelen in #10982
  • date: fix -d with relative dates and timezone abbreviations by @yachi in #10956
  • date: fix timezone abbreviations using wrong offset outside their DST season by @aguimaraes in #11045
  • date: fix %+ and %_ modifier edge cases by @naoNao89 in #10999
  • date: extend tz abbreviation lookup by @cerdelen in #11229
  • date: Remove eprintln! to avoid 2>/dev/full abort by @oech3 in #11228
  • date, comm, tty: Fixing handling output to dev/null by @ChrisDryden in #10888

dd

df

dircolors

du

echo

env

expand

expr

  • expr --version >/dev/full panics & --help > /dev/full should fail by @oech3 in #10854

factor

false

fmt

  • fmt: restore GNU compatibility for tests/fmt/width by @karanabe in #11073

fold

hostname

id

install

kill

  • kill: fix GNU compatibility tests for RTMIN and RTMAX by @karanabe in #11224

ln

  • fix: eliminate TOCTOU races in ln and tac by deferring is_dir() checks by @abendrothj in #10991
  • ln: Interactive and Force override each other instead of defaulting to Force if both are specified by @aweinstock314 in #11129

ls

mktemp

mknod

mv

  • mv: handle FIFOs inside directories during cross-partition move by @ChrisDryden in #10857
  • fix(mv): correct selinux cfg gating for non-Linux platforms by @naoNao89 in #10989
  • mv: Use rustc-hash by @oech3 in #11010
  • mv: preserve symlinks during cross-device moves instead of expanding them by @sylvestre in #10546

nl

  • perf(nl): optimize line numbering by using itoa and direct writing by @CrazyRoka in #10757

nproc

numfmt

od

paste

pr

printf

  • printf: fix %q shell quoting with control chars and quotes by @sylvestre in #10816

ptx

  • ptx: implement -t/--typeset-mode to change default width to 100 by @ChrisDryden in #10856
  • ptx: fix panic when truncation string/keyword contain multibyte Unicode by @Xylphy in #10836
  • ptx: match GNU default behavior by skipping non-alphabetic index tokens by @Xylphy in #10919

readlink

rm

  • rm --preserve-root should work on symlink too by @sylvestre in #9706
  • rm: report permission denied for unreadable subdirectories by @o1x3 in #10974

shuf

sort

split

stat

  • stat: fix mount table read when /proc is unavailable by @sylvestre in #10300
  • print_numeric: print mode in octal when the mode is too large by @Connor-GH in #10208

stdbuf

stty

sync

tac

tail

  • tail: report PermissionDenied instead of No such file when metadata fails by @RedNhight in #11018
  • tests/tail: reduce delays in multiple tests to speed up execution by @domysu in #11206

test

tr

true

  • true/false: remove large clap call by @my4ng in #10673
  • true, false: Improve perf & fix clippy::unnecessary_wraps by @oech3 in #11200
  • feat(true/false): add benchmarks for startup performance by @naoNao89 in #10996

tsort

unexpand

uniq

uptime

vdir

wc

  • wc: stop processing --files0-from input after stdout write failure by @mattsu2020 in #11023

whoami

uucore

  • uucore: refactor digest_reader to use ReadingMode enum by @0xMillyByte in #10720
  • uucore: Use nix::sys::stat::umask in uucore::mode::get_umask by @mattsu2020 in #11102
  • uucore: fix correct mkdirat implementation to use nix crate's mkdirat function by @mattsu2020 in #11126
  • uucore: replace unsafe libc calls with safe nix crate wrappers by @mattsu2020 in #11156
  • uucore: use transmute instead of raw pointers by @xtqqczze in #11077
  • uucore: Disallow slashes in determine_backup_suffix by @aweinstock314 in #11149
  • uucore: disable signals at simple utils for binary size and fast startup by @oech3 in #11186
  • dedup high-cost localization setup by @oech3 in #11147

CI & Build

Documentation

Code Quality & Cleanup

Dependency Updates

Version Management

New Contributors

Full Changelog: 0.6.0...0.7.0

Don't miss a new coreutils release

NewReleases is sending notifications on new releases.