Builder derive crates

RecipeCratesCategories
bonboncat-rust-patterns
derive_builderderive_buildercat-rust-patterns
typed-buildertyped-buildercat-rust-patterns

typed-builder

typed-builder typed-builder-crates.io typed-builder-github typed-builder-lib.rs cat-rust-patterns

Compile-time type-checked builder derive. The oldest crate for compile-time-checked builders that has (987K downloads/month, 916 stars, 7 years old)

derive_builder

derive_builder derive_builder-crates.io derive_builder-github derive_builder-lib.rs cat-development-tools cat-rust-patterns

Rust macro to automatically implement the builder pattern for arbitrary structs.

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)

bon

bon-website bon bon-crates.io bon-github bon-lib.rs cat-asynchronous cat-data-structures cat-no-std cat-no-std::no-alloc cat-rust-patterns

Next-gen compile-time-checked builder generator, named function arguments.

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).