←back to thread

203 points dahlia | 1 comments | | HN request time: 0.199s | source
Show context
bschwindHN ◴[] No.45156696[source]
Rust with Clap solved this forever ago.

Also - don't write CLI programs in languages that don't compile to native binaries. I don't want to have to drag around your runtime just to execute a command line tool.

replies(9): >>45156782 #>>45156785 #>>45157057 #>>45157203 #>>45158148 #>>45159646 #>>45160365 #>>45161166 #>>45163035 #
1. dcminter ◴[] No.45156785[source]
The declarative form of clap is not quite as well documented as the programmatic approach (but it's not too bad to figure out usually).

One of the things I love about clap is that you can configure it to automatically spit out --help info, and you can even get it to generate shell autocompletions for you!

I think there are some other libraries that are challenging it now (fewer dependencies or something?) but clap sets the standard to beat.