Skip to content

Clap derive or builder? #5724

Answered by epage
MarkuBu asked this question in Q&A
Sep 5, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

We briefly discuss which to use in our FAQ, see https://docs.rs/clap/latest/clap/_faq/index.html#when-should-i-use-the-builder-vs-derive-apis

For most users, the main difference is whether you define your CLI through attributes on a struct and its fields or use a builder API. Nearly all of the builder functionality is exposed through the derive API.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MarkuBu
Comment options

Answer selected by MarkuBu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants