Rust-Written Replacement To GNU Coreutils Progressing, Some Binaries Now Faster

Written by Michael Larabel in Programming on 29 January 2022 at 07:52 AM EST. 221 Comments
PROGRAMMING
Along with the broader industry trend of transitioning security-sensitive code to memory-safe languages like Rust, there has been an effort to write a Rust-based replacement to GNU Coreutils. For nearly a year that Rust Coreutils has been able to run a basic Debian system while more recently they have been increasing their level of GNU Coreutils compatibility and in some cases now even outperforming the upstream project.

GNU Coreutils provides some of the common and important command-line tools on Linux systems and other platforms. The GNU Core Utilities include commonly-used commands like cat, ls, rm, chmod, mkdir, wc, whoami, and dozens of others. Sylvestre Ledru and other developers have been working on a Rust-based Coreutils to gut out the C code and instead use this modern programming language priding itself on memory safety and security.


uutils/coreutils is the Rust replacement to the C-based GNU Coreutils.


Ledru posted an update today on Rust Coreutils, which recently saw its v0.0.12 release. There are now dozens of contributors each month contributing 400+ patches to this effort.

Not only should the Rust Coreutils be more secure, but for some binaries they are now seeing "significantly" better performance than out of the GNU package for commands like head, cut, and other common ones. They remain on the challenge of closing the compatibility gap for these utilities with the upstream GNU commands. One of their lone remaining binaries still to be implemented is stty.

Along with their optimizations and compatibility work, the developers are also going to be seeing about allowing Debian and Ubuntu the ability to easily switch by default to the Rust Coreutils without requiring any hacks / funky configurations.

More details as to the current state of Rust Coreutils via Sylvestre Ledru's blog. The code for the project is hosted on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week