Rust 和 Libc 中的 18KB 文件列表工具
1 分•作者: tracyspacy•18 天前
FLI 的初始发布 - 一个非常小巧且快速(类似于 `ls`)的目录列表工具。
*初始原因:* 需要一个易于阅读的、类似于 `ls` 的工具,用于树莓派通过 SSH 使用。
*当前原因:* 检查是否可以使用 Rust 构建比核心工具更快、更小的工具。
* 大小:
* 18KB - 树莓派 Zero W
* 51KB - Mac
* 默认模式通过 `readdir()` 流式输出到 stdout,无需堆分配。
* 通过使用 `(` 和 `)` 而非文本着色,提高了可读性。
* 使用 `no_std` Rust + `libc` 编写。
仓库:https://github.com/tracyspacy/fli
查看原文
Initial release of FLI - really tiny and fast (like a ) directory listing tool.<p><i>Initial Why:</i> need some easy readable <i>ls</i> like tool for rpi to use via ssh.
<i>Current Why:</i> check if with Rust one can build core utils like tools faster and smaller.<p>- Size:
18K - RPI ZERO W
51KB - Mac<p>- Default mode streams readdir() => stdout with zero heap allocation.<p>- Nice readabilty thx to ( and ) instead of text coloring<p>- Written in no_std rust + libc.<p>repo: https://github.com/tracyspacy/fli