[Media] A tiny (18KB for rpi zero) easy to read file listing tool. no_std + libc

88 points tracyspacygo 20 comments
[Media] A tiny (18KB for rpi zero) easy to read file listing tool. no_std + libc

Why?
I have access to my raspberry pi zero via ssh only. As for me it is hard to differentiate types of files etc based on colors, I needed something more readable and clear like picture/icon or emoji as I ended up with etc. And I decided to build fli and since ls is obviosly preinstalled on almost any machine, the second requirement for fli as a complimentary tool, is to be tiny.

Readability: Nice readability thanks to use of emojis (📄 and 🗂️) instead of text coloring.

Size: Since rust std contributes heavily to binary size, this project is no_std + libc

Current binary size: M-series Mac 51KB , rpi zero 18KB.

Display options:

  • fli : short (name and type) not sorted output - direct stream, no heap allocation
  • fli -s: short (name and type) sorted by name output - uses heap allocation
  • fli -l : long (name, type, metadata ) not sorted output and fixed-sized alignment (20 chars for size and n_link) - direct stream, no heap allocation
  • fli -l -s: long (name, type, metadata ) sorted by name output and dynamic alignment - uses heap allocation.
  • fli -l -S: long (name, type, metadata ) sorted by size output and dynamic alignment - uses heap allocation.

GitHub repo: https://github.com/tracyspacy/fli