3 ms·
500K to parse options is frankly too much...
by twsted 5y ago
500K to parse options is frankly too much...
- wongarsu 5y agoIn most software people will care more about helpful error messages and readable help texts than about half a megabyte of code size. Coreutils with its tiny frequently called binaries is an outlier where the size adds up, but that's not the norm.
- 0xedd 5y agoNot sure how you are serious about your reply. PCs are a small market and a solution fitting them hardly represents a valid approach. There is an entire world of small devices that don't vomit terabytes of disk space. One of the most attractive features of Linux is how it suits a large array of hardware. Replacing C solutions with some bloated bandwagon alternative is a bad idea.
- wongarsu 5y agoYes, if you write software for devices with megabytes of disk space then don't use Clap for argument parsing in your software. I'm not really sure how that's a criticism of Clap in general, or the rust coreutils specifically. Rust coreutils built as a single binary (as opposed to one binary per tool) is about 8MB. Anyone who is agonizing over 500kB of RAM or disk space is going to use BusyBox instead of either the GNU coreutils or a rust replacement for them. Why limit the implementation to satisfy the needs of somebody who wouldn't choose you anyways?
- duckerude 5y agoThis thread inspired me—I found a way to remove 40K: https://github.com/clap-rs/clap/pull/3370 https://github.com/clap-rs/clap/pull/3370 I'm sure it's possible to cut it more. It'll never be tiny, but it can be smaller than it is now.