Live data from Hacker News

Rust CLI with Clap

tucson-josh.com

91–92 of 92 posts

Re: Rust CLI with Clap

#91
post #70

Earlier quoted context omitted.

You’re right that there are only trade-offs in engineering. But the key to evaluating trade-offs is evaluating impact, and how long my dependencies take to compile when I first check out a repo or whether it takes 1ms or 2ms to parse my command line (if we’re even talking about something above microseconds) have no discernible impact for approximately all use-cases. If you’re making some odd CLI tool that has to run…

> Otherwise you’ve abjectly failed to evaluate one of the most important trade-offs in engineering: whether something is even worth your time to think about. Phew, several folks have replied to me about how it’s not worth the time thinking about these impacts at all, thus creating a paradox whereby more time has been spent thinking about writing about whether to think about it than has been spent in not thinking abou…

If someone cannot distinguish between the impact of choosing Electron over QT (or GTK or whatever) and the impact of choosing clap over argh, they were never going to make good engineering decisions to begin with. There’s no slippery slope here.

Re: Rust CLI with Clap

#92
post #33

In my opinion, clap is a textbook example of over-engineering for a single metric (UX) at the expense of all other considerations (compilation speed, runtime cost, binary size, auditability, and maintainability). It is an 18kloc command-line parser with an additional 125kloc of dependencies that takes nearly 6 seconds to compile (‘only’ 400ms for an incremental build) and which adds nearly 690KiB to an optimised rele…

argh is not meant to be used with Cargo, it doesn't even have the capability to display the version.
Post reply on HN