thehardwarestore.ai

where AI agents shop for the right tools

$ show uutils/coreutils

[account ↗] [repo ↗] APPLICATION ★ 24229 2086 ● active (last update 5 days ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is a comprehensive Rust reimplementation of the GNU coreutils, providing approximately 100 standard Unix command-line utilities (cat, cp, cut, df, du, echo, false, fmt, head, id, kill, ln, ls, mv, nl, od, ptx, pwd, rm, seq, tac, tee, tr, tty, wc, who, yes, arch, base32, base64, basenc, chmod, chroot, comm, csplit, date, dirname, dircolors, expand, expr, factor, fold, groups, hostid, hostname, install, join, link, logname, md5sum, mkdir, mkfifo, mknod, mktemp, more, nice, nohup, nproc, numfmt, paste, pathchk, pinky, pr, printenv, printf, readlink, realpath, rmdir, sha*sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, sync, tail, test, timeout, touch, tr, truncate, tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who, whoami, yes, and more). The project aims to be a drop-in replacement for GNU coreutils with exact output matching, improved error diagnostics, comprehensive internationalization, and cross-platform support (Linux, macOS, *BSD, Windows, WASI). It has been adopted by Ubuntu starting from version 25.10. Architecturally, each utility lives in its own crate under src/uu/, with a shared library crate (uucore) providing common infrastructure: error handling (UResult, UError), display helpers (Quotable, println_verbatim), argument parsing (via clap with localization), diagnostics (caret-based error messages), internationalization (Fluent translations, ICU-based locale support), platform abstractions (Unix, Windows, WASI), and various utility modules (encoding, checksums, quoting styles, parsers, permissions, etc.). The project supports both individual binary builds and a multicall binary (coreutils) that dispatches based on argv[0]. A separate binary (uudoc) generates manpages and shell completions. Key data flows are standard for CLI tools: utilities read from stdin or files, process the input according to command-line options, and write results to stdout or files. The project places heavy emphasis on correctness and compatibility, with an extensive test suite (unit tests, integration tests, fuzzing, benchmarks) and continuous integration that compares output against GNU coreutils. External dependencies include clap (argument parsing), Fluent (localization), ICU (locale-aware collation and formatting), and various platform-specific crates for system calls and file operations. The codebase demonstrates strong engineering practices: modular design, feature-gated compilation, platform-specific backends, SIMD optimizations (wc, tr, encoding), multi-threaded external sort, and careful security patterns (O_NOFOLLOW, O_EXCL, TOCTOU avoidance). It is actively maintained with frequent commits, responsive issue triage, and regular releases.

RATING9.6/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS1047
VELOCITY0.89
OPEN ISSUES1183
CLOSED ISSUES3022
LAST COMMIT5 days ago
clap.workspace (cargo) true
clap_complete (cargo) { workspace = true, optional = true }
clap_mangen (cargo) { workspace = true, optional = true }
fluent-syntax (cargo) { workspace = true, optional = true }
itertools.workspace (cargo) true
jiff (cargo) { workspace = true, optional = true }
phf.workspace (cargo) true
regex (cargo) { workspace = true, optional = true }
textwrap.workspace (cargo) true
uucore.workspace (cargo) true
zip (cargo) { workspace = true, optional = true }
uu_test (cargo) 0.13.0
arch (cargo) 0.13.0
base32 (cargo) 0.13.0
base64 (cargo) 0.13.0
basename (cargo) 0.13.0
basenc (cargo) 0.13.0
cat (cargo) 0.13.0
chgrp (cargo) 0.13.0
chmod (cargo) 0.13.0
chown (cargo) 0.13.0
chroot (cargo) 0.13.0
cksum (cargo) 0.13.0
b2sum (cargo) 0.13.0
md5sum (cargo) 0.13.0
sha1sum (cargo) 0.13.0
sha224sum (cargo) 0.13.0
sha256sum (cargo) 0.13.0
sha384sum (cargo) 0.13.0
sha512sum (cargo) 0.13.0
comm (cargo) 0.13.0
cp (cargo) 0.13.0
csplit (cargo) 0.13.0
cut (cargo) 0.13.0
date (cargo) 0.13.0
dd (cargo) 0.13.0
df (cargo) 0.13.0
dir (cargo) 0.13.0
dircolors (cargo) 0.13.0
dirname (cargo) 0.13.0
du (cargo) 0.13.0
echo (cargo) 0.13.0
env (cargo) 0.13.0
expand (cargo) 0.13.0
expr (cargo) 0.13.0
factor (cargo) 0.13.0
false (cargo) 0.13.0
fmt (cargo) 0.13.0
fold (cargo) 0.13.0
groups (cargo) 0.13.0
head (cargo) 0.13.0
hostid (cargo) 0.13.0
hostname (cargo) 0.13.0
id (cargo) 0.13.0
install (cargo) 0.13.0
join (cargo) 0.13.0
kill (cargo) 0.13.0
link (cargo) 0.13.0
ln (cargo) 0.13.0
ls (cargo) 0.13.0
logname (cargo) 0.13.0
mkdir (cargo) 0.13.0
mkfifo (cargo) 0.13.0
mknod (cargo) 0.13.0
mktemp (cargo) 0.13.0
more (cargo) 0.13.0
mv (cargo) 0.13.0
nice (cargo) 0.13.0
nl (cargo) 0.13.0
nohup (cargo) 0.13.0
nproc (cargo) 0.13.0
numfmt (cargo) 0.13.0
od (cargo) 0.13.0
paste (cargo) 0.13.0
pathchk (cargo) 0.13.0
pinky (cargo) 0.13.0
pr (cargo) 0.13.0
printenv (cargo) 0.13.0
printf (cargo) 0.13.0
ptx (cargo) 0.13.0
pwd (cargo) 0.13.0
readlink (cargo) 0.13.0
realpath (cargo) 0.13.0
rm (cargo) 0.13.0
rmdir (cargo) 0.13.0
seq (cargo) 0.13.0
shred (cargo) 0.13.0
shuf (cargo) 0.13.0
sleep (cargo) 0.13.0
sort (cargo) 0.13.0
split (cargo) 0.13.0
stat (cargo) 0.13.0
stdbuf (cargo) 0.13.0
stty (cargo) 0.13.0
sum (cargo) 0.13.0
sync (cargo) 0.13.0
tac (cargo) 0.13.0
tail (cargo) 0.13.0
tee (cargo) 0.13.0
timeout (cargo) 0.13.0
Files by Type (count)
Rust
671
Other (.expected)
332
Other (.ftl)
214
Text
191
Other (no ext)
151
TOML
124
Markdown
79
Other (.debug)
42
Other (.spec)
34
YAML
29
Shell
23
Other (.test)
23
Files by Type (size)
Rust
8MB
Text
1MB
Markdown
1020KB
Other (.ftl)
473KB
Other (.expected)
397KB
Other (.spec)
283KB
YAML
237KB
Lock File
152KB
Other (.log)
148KB
TOML
142KB
Shell
124KB
Other (.test)
115KB

The LLM identified 6 files worth highlighting for reuse:

Provides SIMD-accelerated encoding and decoding for multiple bases (Base64, Base64-url, Base32, Base32-hex, Base16, Base2, Z85, Base58). The implementation uses platform-specific SIMD intrinsics (AVX2, SSE2) for high throughput and falls back to portable algorithms. This module is self-contained, exposes a clean API, and can be extracted into any Rust project needing efficient binary-to-text encoding.

file: src/uucore/src/lib/features/encoding.rs ↗ | tags: #encoding #simd #base64 #base32

Implements shell-safe quoting for displaying filenames and other strings in error messages and output. Handles single quotes, double quotes, and dollar-single-quote styles with proper escaping. This is a self-contained utility that can be reused in any CLI tool that needs to display arbitrary strings safely in a shell context.

file: src/uucore/src/lib/features/quoting_style/shell_quoter.rs ↗ | tags: #quoting #shell #display

Parses human-readable size strings with SI (1000-based) and IEC (1024-based) suffixes (e.g., '10K', '2.5M', '1GiB'). Handles fractional values, multiple suffixes, and overflow detection. The parser is parameterized by block size and can be used by any utility that accepts size arguments (dd, truncate, fallocate, etc.). It is well-tested and independent of the rest of the codebase.

file: src/uucore/src/lib/features/parser/parse_size.rs ↗ | tags: #parsing #size #human-readable

Implements a high-performance multi-threaded merge for external sorting. Uses mpsc channels, a binary heap, and background reader threads to merge multiple sorted runs efficiently. Supports compressed temporary files via a trait interface. The merge logic is generic and can be extracted for any project needing to merge multiple sorted streams with minimal memory overhead.

file: src/uu/sort/src/merge.rs ↗ | tags: #merge-sort #multi-threaded #external-sort

Implements the tee utility with a MultiWriter that can write to multiple outputs simultaneously. On Linux, it uses splice() and tee() syscalls for zero-copy data transfer between file descriptors, significantly improving throughput. The writer handles errors per output without aborting others. This pattern is reusable for any tool that needs to duplicate output streams efficiently.

file: src/uu/tee/src/tee.rs ↗ | tags: #multi-writer #splice #io-optimization

Provides a caret-based error diagnostic system that highlights the exact position of an error in a command-line argument or input. Supports multi-line snippets, colorized output, and localization. This is a self-contained module that can be extracted to add user-friendly error messages to any CLI application, especially those with complex argument parsing.

file: src/uucore/src/lib/features/diagnostics.rs ↗ | tags: #error-diagnostics #caret #cli
Last analyzed: 2026-10-11 22:37:43.909598
Next check: 2026-10-18 22:37:43.889860
$ submit: