fcoreutils
High-performance GNU coreutils replacement in Rust. Faster with SIMD acceleration. Drop-in compatible, cross-platform.
Performance (independent benchmarks v0.0.53, Linux x86_64, hyperfine)
| Tool | Speedup vs GNU | Benchmark |
|---|---|---|
| wc | 33.2x | default 100MB text |
| sort | 7.0x | lexicographic 10MB |
| uniq | 6.2x | repetitive 10MB |
| cut | 5.6x | -b1-100 10MB CSV |
| tr | 3.7x | -d lowercase 10MB |
| base64 | 3.1x | decode 10MB |
| tac | 2.6x | reverse 100MB text |
| b2sum | 1.3x | single 100MB text |
| sha256sum | 1.0x | single 100MB text |
| md5sum | 1.0x | single 100MB text |
Tools
| Tool | Binary | Status | Description |
|---|---|---|---|
| wc | fwc |
Optimized | Word, line, char, byte count (SIMD SSE2, single-pass, parallel) |
| cut | fcut |
Optimized | Field/byte/char extraction (mmap, SIMD) |
| sha256sum | fsha256sum |
Optimized | SHA-256 checksums (mmap, madvise, readahead, parallel) |
| md5sum | fmd5sum |
Optimized | MD5 checksums (mmap, madvise, readahead, parallel) |
| b2sum | fb2sum |
Optimized | BLAKE2b checksums (mmap, madvise, readahead) |
| base64 | fbase64 |
Optimized | Base64 encode/decode (SIMD, 4MB chunks, raw fd stdout) |
| sort | fsort |
Optimized | Line sorting (parallel merge sort) |
| tr | ftr |
Optimized | Character translation (SIMD range translate/delete, AVX2/SSE2, parallel) |
| uniq | funiq |
Optimized | Filter duplicate lines (mmap, zero-copy, single-pass) |
| tac | ftac |
Optimized | Reverse file lines (chunk-based SIMD scan, zero-copy writev) |
Installation
Or build from source:
Binaries are in target/release/.
Usage
Each tool is prefixed with f to avoid conflicts with system utilities:
# Word count (drop-in replacement for wc)
|
# Cut (drop-in replacement for cut)
# Hash tools (drop-in replacements)
# Base64 encode/decode
# Sort, translate, deduplicate, reverse
Key Optimizations
- Zero-copy mmap: Large files are memory-mapped directly, avoiding copies
- SIMD scanning:
memchrcrate auto-detects AVX2/SSE2/NEON for byte searches - stat-only byte counting:
wc -cusesstat()without reading file content - Hardware-accelerated hashing: sha2 detects SHA-NI, blake2 uses optimized implementations
- SIMD base64: Vectorized encode/decode with 4MB chunked streaming
- Parallel processing: Multi-file hashing and wc use thread pools
- SIMD range translate/delete:
trdetects contiguous byte ranges and uses AVX2/SSE2 SIMD - Chunk-based reverse scan:
tacprocesses backward in 512KB chunks with forward SIMD within each chunk - Optimized release profile: Fat LTO, single codegen unit, abort on panic, stripped binaries
GNU Compatibility
Output is byte-identical to GNU coreutils. All flags are supported including --files0-from, --total, --complement, --check, and correct column alignment.
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project follows the Contributor Covenant Code of Conduct.
Architecture
See ARCHITECTURE.md for design decisions and PROGRESS.md for development status.
Security
To report a vulnerability, please see our Security Policy.
License
MIT