Open Veetaha opened 1 month ago
IMO bon is too young (unpopular) at this stage to put it on this site.
Note that it adds syntax for "named function arguments" via builders (deriving a builder from a function/method) which could be a separate section. For this there aren't more mature popular crates (one that I know of is buildstructor, but it's more limited and and wasn't promoted enough). But that's fine, bon
can wait. What would you consider as "popular/mature enough"?
I'm definitely biased, since I maintain
bon
, but there are currently 3 main crates for generating builders:bon
- compile-time-checked builders, named function arguments via builders (foo().arg(...).call()
), fallible/async builders, method builders (self.foo(...).arg(...).call()
). The newest crate built based on lessons learned from typed-builder and derive_builder (33K downloads/month, but gaining popularity, 1095 stars, 3 months old).typed-builder
- compile-time-checked builders. The oldest crate for compile-time-checked builders that has (987K downloads/month, 916 stars, 7 years old)derive_builder
- runtime-checked builders, works with&self
,&mut self
builder patterns. The oldest crate for runtime-checked builders overall (1,58M downloads/month, 1285 stars, 8 years old)