it is actually better and written in rust comparable with fedora. switching to some core components from c to rust a good security update.
cat is here for compatibility reason and because it’s a default UNIX utility.
Replacing it by a compatible utility could be considered but
bat is not compatible nor does it intend to be so that would be an addition, not a replacement.
The rust ecosystem has a long ways to go to get integrated into distributions. At the moment:
$ du -sh /usr/bin/bat 4.6M /usr/bin/bat $ du -sh /usr/bin/cat 44K /usr/bin/cat
Not something I would want on my IoT device.
I think you should consider using something like Busybox for IoT anyway.
As it seems, the developers do consider it a drop in replacement for cat, at least this is what they write in their documentation:
They also have a checklist for POSIX compliance of the tool:
But the checklist is not complete, which I think would be a show stopper. Also, I’m not even sure if full POSIX compliance would be enough for it to replace cat, because the GNU coreutils cat that is used now is in development since 1988 and is therefore as thoroughly tested as a piece of software can be. Bat is quite a lot younger and since there are so many shell scripts and programs relying on cat it would be an unnecessary risk in my opinion.