Rust Coreutils 0.8: Faster, safer – and now in the browser
The Rust reimplementation of GNU Coreutils is faster, runs in the browser, and secures system calls better. What version 0.8 brings in detail.
(Image: heise medien)
The reimplementation of the classic Unix tool collection, written in Rust, is significantly enhanced with version 0.8.0: The developers of uutils coreutils report noticeable performance gains across many programs, are significantly expanding support for WebAssembly, and are simultaneously improving the security of system-level calls. GNU compatibility is also increasing, while the developers have eliminated numerous causes of crashes.
The uutils coreutils project completely reimplements the well-known GNU Coreutils – such as ls, cp, cat, or sort – in Rust. The focus is on memory and type safety, high compatibility with GNU behavior, and good portability to different platforms.
Faster dd, leaner ls
The new version centers on broad performance optimizations. The most significant gain is in dd: Thanks to more efficient thread utilization in the shared library uucore, the tool is up to 45 percent faster, according to the release notes. ls also benefits: Instead of recursive directory traversals, it now uses an iterative depth-first search. This saves function calls and memory allocations, especially with deeply nested directory trees. Further optimizations concern I/O paths and syscall usage: cat now avoids unnecessary pipe() calls, and wc and tee handle large data streams more efficiently. The startup time of all utilities is also reduced because uucore now calls the rt_sigaction syscall only once instead of 62 times.
In parallel, the developers are advancing internal modernization. A key step is the migration from the Rust library nix to rustix. The latter maps POSIX and Linux system calls more type-safely and reduces the amount of unsafe code. In this version, the developers have already converted numerous utilities, including cat, df, wc, tty, tsort, tail, touch, date, mkdir, and uucore. The unsafe code areas are also shrinking in hostname, logname, nice, and who.
Videos by heise
Coreutils in the Browser
WebAssembly support has been significantly expanded: More than 70 utilities now run in WASI environments. A new online playground makes the Coreutils directly accessible in the browser. Technically, this requires some adjustments, such as the omission of multithreading for sort or embedding all localization data into the binary.
The number of passed tests from the GNU test suite increases to 630 – one more than in version 0.7. The developers continue to work closely with the GNU project and report bugs found. Both projects benefit from this.
Stability, Platforms, Documentation
In addition, the release includes numerous detailed improvements. Error handling has become more robust, for example, with unusual inputs or when writing to /dev/full. Platform support is growing, including for NetBSD and Windows. The documentation includes revised man pages with practical examples, source code links, and translations into multiple languages.
All information about uutils coreutils 0.8.0 can be found in the release notes on GitHub.
(fo)