Rust Coreutils 0.8.0:兼容性达到 94.75%,并优化性能
2026 年 4 月 7 日,Rust Coreutils(uutils)0.8.0 版本发布。该项目用 Rust 实现了超过 100 个 GNU Coreutils 工具:wc、ls、tail、sed、sort、cat、chmod、chown、chroot、cp、date、dd、du、install、echo、hostname、id、ln 等。与 GNU Coreutils 测试集的兼容性已达 94.75%——630 个测试成功通过(较之前的 629 个增加),21 个测试失败(较之前的 23 个减少),14 个测试跳过(较之前的 13 个增加)。
该项目强调跨平台支持:Windows、Redox、Fuchsia、带 WASI 的 WebAssembly。MIT 许可(不同于 GNU 的 GPL)。已在 Ubuntu 25.10、AerynOS(Serpent OS)、Apertis 中使用。util-linux、diffutils、findutils、procps、acl、sed、login 的类似实现正在开发中。
主要性能改进
本版本专注于优化和安全性。从 hostname、logname、who、nice 等工具中移除了不安全代码。在 cat、df、wc、tty、tsort、tail、touch、date、mkdir、uucore 中,现在使用 rustix 替代 nix,从而减少不安全代码。
dd 性能提升 45%,numfmt 提升 3%。工具启动速度得到改进,sort 现在能更快地排序路径。true、false、echo 的二进制文件大小缩小。ls、wc、cat、tee、pr 得到优化。
为 70 多个工具添加了 WebAssembly 和 WASI 支持:ls、head、cat、cp、mv、sort、tail 等。新推出的在线演示平台提供交互式终端,可在浏览器中测试 uutils。
功能扩展与修复
以下工具更新了选项并修复了 bug:
- cat, chown, cksum, cp
- cut, date, dd, df
- env, expand, expr, factor
- head, install, ln, ls
- mkdir, nice, numfmt, od
- pr, sort, split, stdbuf
- stty, sync, tee, timeout
- touch, tr, true, tsort
- tty, wc, yes
在边缘情况下加强了 panic 保护。该项目持续减少不安全代码,提高生产环境的可靠性。
主要要点
- 与 GNU Coreutils 的兼容性——94.75%,630/665 测试通过。
- dd 速度 +45%,numfmt +3%,ls、sort、cat、tee 等优化。
- 70 多个工具支持 WebAssembly/WASI,浏览器在线演示。
- 改用 rustix 替代 nix,移除不安全代码。
- 跨平台:Windows、Redox、Fuchsia、Ubuntu 25.10。
此次发布证实了 uutils 作为 Rust 生态中 GNU Coreutils 替代品的成熟度。开发者获得了一个更快、更安全且许可宽松的替换方案。
— Editorial Team
暂无评论。