Rust Coreutils 0.3.0: Up to 3.7x Faster Than GNU Tools

The Rust re-implementation of classic Unix tools achieves significant performance gains and improved security in version 0.3.0.

listen Print view
silver R in a gear, gray background

(Image: heise medien)

3 min. read

The Rust Coreutils project has released version 0.3.0, delivering significant speed improvements over the traditional GNU Core Utilities. According to the developers, the sort command surpasses the GNU variant in regular sorting by a factor of 3.72. Other tools have also been considerably accelerated: expand is 1.8 times faster, and nl is 1.57 times faster.

Rust Coreutils is a re-implementation of over 100 classic Unix command-line programs such as ls, cp, or rm, originally written in C. Some users have already switched: Canonical is using the Rust tools in Ubuntu 25.10 by default in Ubuntu 25.10. The developers of Rust Coreutils aim for one hundred percent compatibility with GNU so that existing user scripts continue to function without modifications.

For continuous monitoring of performance development, the developers have integrated the CodSpeed platform into their CI/CD pipeline. The system automatically detects performance degradations and ensures that optimizations are maintained in the long term. The benchmarks now cover over 15 central tools, including sort, ls, uniq, du, and base64. base64 (1.2 times faster), unexpand (1.5 times faster), and uniq -c (1.13 times faster) also benefit from the adjustments.

A key focus of version 0.3.0 is improved security. For the tools rm, du, chmod, and chgrp, the developers have implemented a secure directory traversal implementation based on the system calls openat and unlinkat. Instead of insecure libc calls, the nix crate is used, which provides memory-safe abstractions—one of the main advantages of Rust over C.

Videos by heise

In terms of compatibility with the GNU test suite, Rust Coreutils currently has 532 passed tests—a rate of 83.91 percent. Compared to version 0.1 (then: 87.06 percent), this initially seems like a step back. However, the developers attribute this to the upgrade of the reference implementation from GNU Coreutils 9.7 to 9.8, which changed test expectations in existing checks and added 16 new tests. Thus, the total number of tests increased from 618 to 634. Of the new tests, 68 fail, 33 are skipped, and one leads to an error.

For developers, the update also brings improvements: the generation of documentation and shell completions has been moved out of the binaries, reducing build times. The CI pipeline now compiles benchmarks in parallel, and the Makefile better supports various build configurations.

The current version is available for download on the project website. In addition to the mentioned improvements, numerous other details have been optimized, including Unicode and non-UTF8 path support, as well as error handling across various utilities. Further information can be found in the Release Notes on GitHub.

(fo)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.