Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add builder derives crates #137

Open
Veetaha opened this issue Oct 5, 2024 · 2 comments
Open

Add builder derives crates #137

Veetaha opened this issue Oct 5, 2024 · 2 comments

Comments

@Veetaha
Copy link

Veetaha commented Oct 5, 2024

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)
@djc
Copy link
Collaborator

djc commented Oct 5, 2024

IMO bon is too young (unpopular) at this stage to put it on this site.

@Veetaha
Copy link
Author

Veetaha commented Oct 5, 2024

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants