posixutils-rs v0.9.0
Depth over breadth: a POSIX.1-2024 conformance pass across the tree
1,009 commits (70 PRs) since v0.8.0 (2026-06-25); 817 files changed,
+178,348 / −66,622.
Nearly every utility touched this cycle was audited against POSIX.1-2024
clause by clause, and the findings fixed. The C compiler alone accounts for a
third of the commits.
Highlights
pccis nowc17— the C compiler driver ships under the name of the
one language it compiles. Dialect switching is gone;-std=remains only as
a compatibility shim.makebuilds real Makefiles — VPATH, built-in inference rules,%
pattern rules,$(eval), the macro function set, conditionals and
define/endef.paxspeakstarandcpio— both command lines route into pax.manrenders pages real systems ship — the pest grammar is gone,
replaced by a roff/mdoc interpreter withtbltext blocks, man-db config
support and in-process decompression.- Byte-faithful text handling —
sh,tr,diff,echo,expr,pax,
i18nandplibcarry file and argument data as bytes, so a non-UTF-8
filename orIFS=éno longer aborts anything. - Dependency diet — the workspace went from 159 to 102 crates.
- aarch64 Linux CI — a second architecture now gates every push.
C compiler (c17, cflow, ctags, cxref)
- Renamed
pcc→c17; compiles exactly one language, C17. - ABI correctness across x86-64 and AArch64: HFAs, all-SSE and mixed structs,
MEMORY-class aggregates, stacked-argument placement and alignment,
__int128andbinary128pairs, Darwin variadic aggregates, and the
register tally a fixed parameter actually spends. - New types and extensions:
__float128(IEEE binary128),_Float16,
_Generic,__attribute__((mode)),transparent_union,vector_size,
computedgoto, case ranges, designated-initializer ranges, GNU?:,
__real__/__imag__,#pragma pack,_Atomicoperators that are actually
atomic. - Builtins: checked arithmetic, floating classification,
__builtin_va_arg_pack,
__builtin_object_size, the fortified_chkentry points, theffs/clrsb
family, and a working<tgmath.h>,<stdint.h>and<stdatomic.h>. - Preprocessor:
__VA_OPT__,-dM,-P,-include, the-Mdependency
family,#include_next, include-guard detection, a correct macro hide set,
and-Eoutput that keeps its source lines. - TLS: dynamic model with TLS descriptors;
-fPICselects a
position-independent model. - Debug info:
-gnow emits line information a debugger can use, plus DWARF
descriptions of functions and their variables. - Constant folding rebuilt to fold each constant at its own width and in the
expression's own format. - Diagnostics: dozens of constraint violations that used to compile silently
are now rejected, and diagnostic message bodies are translatable. cflowanalyzes object files, assembler source, and lex/yacc input;
ctags/cxrefoutput formats corrected.- CPython 3.12.9 builds and passes its full test suite at
-O0and-O2.
Shell (sh)
- Expansion, lexing and pattern matching carry byte strings end to end.
- Field splitting rewritten as one state machine transcribing POSIX 2.6.5.
- Job control: async lists,
bg/fg, blockingwaitpid, status retention
untilwaitcollects it, and refusal offg/bgin a subshell. - Built-ins:
test/[sharing one evaluator with the utility,pwd,true,
false,cd -e, a conformingulimit,umask,unalias,fc. - Correct exit statuses,
$-,$!,errexit, and-or short-circuiting,
subshell traps, and command-substitution status. - Fixed two here-document hangs, eight process-aborting panics, and pipeline
descriptor leaks. - New PTY test harness.
Editors (vi, ex, ed)
vi::map/:unmap/:ab/:unawith shortest-match lookup, a tag stack
(:tag,^],^T), autoindent with spec-correct^D, abbreviations, and
key input driven through a real terminal queue.vi: undo recorded for every buffer-changing command; motions classified so
operators act on the right region; character and display-column counting
where bytes were counted; buffer preserved on hangup.ex: address resolution rebuilt (separators, marks, line 0, excess
addresses), POSIX write and join rules, real substitute flags and
replacement escapes,+commandand argument lists.ed: mark tracking across structural edits, one substitute per undo,wq
parsing,noutput format.
Build tools (make, lex, yacc, nm, strip, ar)
make: VPATH and thevpathdirective, built-in inference rules,%
pattern rules,$(eval), macro functions, conditionals,define/endef,
overrideranking,.SCCS_GETretrieval, PROJECTDIR search,-pdatabase
dump in makefile syntax, and a ledger-based build state. The rowan CST was
replaced by a line scanner.lex: equivalence classes derived from the NFA, per-start-condition entry
states,^resolved by automaton rather than post-match filter, REJECT
history, bracket-expression conformance,YY_INPUT.yacc: LALR closure termination, non-productive non-terminal rejection,
precedence from the last terminal,$nresolution in mid-rule actions,
yytnamein internal symbol order,$undefined.nm/strip: filter interaction, section symbols, long archive member names.
Archives and file transfer (pax, compress)
tarandcpiofront-ends.- Extraction is fd-relative, so a planted symlink cannot redirect a write.
- Extended headers:
path=records for oversized names, non-UTF-8 pathnames
under-o invalid=binary,-okeyword options when listing, time keywords. - Correct
-ssubstitution,-uper member, hard-link contents in cpio,
multi-volumeustarprefixes, and attribute restoration on copy. compresspreserves mtime at nanosecond resolution and pre-1970 timestamps.
Text utilities
diff:-c/-ubuilt from grouped sections, byte comparison, directory
differences in the exit status.patch: reads context diffs the waydiffwrites them, refuses absolute
and parent-directory names, detects format over the whole patch, recognizes
mailed headers.tr: locale-driven case conversion and class membership,-cvs-C,
equivalence classes, the string2 class rules.od: float rendering as shortest-round-trip%gin aligned columns,-t f
size letters, long double conversion, block-group duplicate suppression,
-Nas a byte count.printf: XBD Ch. 5 precision and flag rules,%n$numbered conversions,
unsigned conversions that saturate, incremental writes.more: streaming input, cell-based measurement, LINES/COLUMNS on resize,
and a PTY test harness.split,csplit,strings,uniq,pr,expr,echo,find,du,
getconf: conformance and diagnostic fixes throughout.
Other utilities
mailx: one command table in place of three interpreters, mailbox locking,
mbox that reads back, blind recipients, terminal-derived screenfuls.talk/talkd: the local transport works at all now; terminfo-driven
drawing, BSD address precedence, signal-safe teardown, end-to-end tests.sccs(ten utilities): one shared implementation of each rule, s-file
protection enforcement,deltaby minimal diff (and on binaries),-i/-x
SID lists, z-file locking with registered cleanup.cron/crontab/at/batch:CRON_ALLOW/CRON_DENYgating, signal
handlers installed before forking,$SHELLas the job interpreter, edits
preserved on editor failure.bc: pest grammar replaced by a hand-written lexer and parser; scale-correct
division,sqrtand modulus; POSIX dynamic scoping; streamed, column-wrapped
output.m4: GNU differential gate, lazy-sline directives matching GNU byte for
byte,ifelsewarning parity.man: see Highlights; also-M,-S,-k/-fnative NAME search,
architecture subdirectories,.sorestricted to manual roots, recursion
bounds throughout the roff interpreter.
Internationalization
gettext-rsloads real message catalogs, honoringNLSPATH, with
positional-argument and plural formatting.- Diagnostics across the tree route through
plib::diag/io_error_text, so
no utility leaks Rust'sDisplayor(os error N). - Locale-aware collation, case mapping and character classes in
plib.
Library and infrastructure
plib: byte-oriented regex and collation,plib::tmp(replacingtempfile
and retiringrustix),plib::ttywith the terminal-write TOCTOU closed,
a descriptor guard, close-on-exec temporaries, andstrerror-faithful
error text.- Dependency reduction from 159 to 102 crates; one codegen unit per crate for
release builds. - CI runs the suite on aarch64 Linux as well as x86-64 Linux and macOS.
- Audit files across the tree were re-probed by execution and reduced to their
open items;cflow,ctags,cxref,echo,printf,talk,talkd,
trandcsplitwere promoted to Stage 6 (Audited).
Security-relevant fixes
paxextracts fd-relative;patchrefuses absolute and parent-directory
paths.gettext-rsbounds catalog allocation taken from an untrusted header.cron/lpguard environment overrides against set-gid, not only set-uid.- Temporary files are created close-on-exec, with cleanup armed and identity
logged. - Recursion and output budgets bounded in
man/roff,m4,bc,makeand
lex.
Contributors
Jeff Garzik, grisenti