Favicon of Coreutils (Rust)

Coreutils (Rust)

uutils coreutils reimplements GNU coreutils in Rust, aiming for drop-in compatibility across Linux, macOS, BSD, Windows, and WASI.

Coreutils (Rust) website screenshot
Coreutils (Rust) GitHub repository preview

uutils coreutils is a Rust reimplementation of the GNU core utilities (ls, cp, cat, rm, and the rest of the standard set). It targets anyone who wants the familiar GNU-style command-line tools running on platforms GNU coreutils doesn't natively support, or who wants a memory-safe, single-binary alternative on Linux itself. It's used by developers, sysadmins, and distro packagers; Ubuntu ships it by default starting with 25.10.

The project treats any behavioral difference from GNU coreutils as a bug, so the goal is exact compatibility in stdout, exit codes, and general behavior, with a few deliberate extensions on top (like improved error diagnostics and progress flags).

Key features

  • Cross-platform coverage: builds and runs on Linux, macOS, *BSD, Windows, and WASI, so the same scripts and utilities work across platforms.
  • GNU compatibility as the goal: matches GNU's stdout, stderr, and error codes; divergences are considered bugs and tracked against the GNU test suite.
  • Multicall binary: compiles into a single BusyBox-style coreutils binary, or as individual per-utility binaries if you prefer.
  • Better error messages: at a terminal, parse errors show a compiler-style report with a caret pointing at the bad argument; scripts and pipes still get the plain GNU-style message.
  • Feature-gated builds: enable windows, unix, feat_selinux, openssl, or WASM feature sets to control what gets compiled in.
  • Optional OpenSSL acceleration: checksum utilities (md5sum, sha256sum, etc.) can link against OpenSSL's libcrypto for speed on CPUs without SHA-NI.
  • SELinux support: chcon and runcon are available via the feat_selinux feature when libselinux and libclang are present.
  • Internationalization: aims for comprehensive UTF-8 support across utilities.
  • Shell completions and manpages: generated via the uudoc binary for bash, zsh, fish, elvish, and PowerShell.
  • Browser playground: try the utilities via WebAssembly without installing anything.

Ideal use cases

This project is a good fit if you need GNU-style coreutils on a platform where GNU coreutils isn't available or isn't ideal, such as Windows, macOS, BSD, or WASI, and you want scripts that behave consistently across those platforms. It also suits anyone building a minimal or embedded Linux system who wants a single small multicall binary instead of installing the full GNU package, or teams that want a Rust-based, memory-safe alternative to the C implementation on a standard Linux box.

It's also useful if you're packaging a distro and want to swap in a drop-in GNU coreutils replacement, or if you want to selectively compile only the utilities you actually use (e.g., base32 cat echo rm) to shrink binary size.

It's not a good fit if you depend on undocumented GNU quirks or very obscure GNU-specific options that aren't yet implemented, since some flags or edge-case behaviors may still be missing or differ. If exact byte-for-byte parity with a specific GNU coreutils version is a hard requirement for your workflow (e.g., regression-tested pipelines), check the GNU test suite compatibility results first, since gaps are tracked but not zero.

Installation

Clone the repository first:

git clone https://github.com/uutils/coreutils
cd coreutils

Build with Cargo (produces a multicall coreutils binary):

cargo build --release

Build a platform-specific feature set:

cargo build --release --features unix
# or
cargo build --release --features windows

Build only selected utilities:

cargo build --features "base32 cat echo rm" --no-default-features

Build with GNU Make (alternative, also handles docs/completions):

make PROFILE=release

Install with Cargo:

cargo install --path . --locked

Install with Make (also installs shell completions and manpages):

make install
# or, to skip a few utilities
make SKIP_UTILS='UTILITY_1 UTILITY_2' install

To uninstall, use cargo uninstall coreutils or make uninstall, matching however you installed it.

Frequently asked questions

Share:

Stars
24.3K
Forks
2.1K
Last commit
6 hours ago
Repository age
13 years
License
MIT
Self-hosted
No
Activity score
83/100
View Repository
Built with:
Ad
Favicon

 

  
 

Similar to Coreutils (Rust)

Favicon

 

  
 
Favicon

 

  
 
Favicon