# elastio/bon

Next-gen compile-time-checked builder generator, named function's arguments, and more!

Repository: https://github.com/elastio/bon
Canonical: https://ross.abutalabs.com/products/bon
Homepage: https://bon-rs.com
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: asynchronous, builder, builder-pattern, builders, constructor, constructors, data-structures, derive, derive-macro, macro, macros, rust, setter, setters, code-generation, generator, setter-methods, no-std, no-std-alloc
Last push: 2026-08-25T01:53:19+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 99, longevity 56
- inputs: {"age_days": 794, "days_push": 9, "days_rel": 9, "gap_med": 5.0, "n_releases_24m": 35}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2120, forks 43 (observed 2026-08-28T04:06:16.489119+00:00)

## What it is
bon is a Rust crate that generates compile-time-checked builders for structs and functions via derive macros and the #[builder] attribute. It also provides idiomatic named and optional parameters for functions and methods, with no_std support.

## Use cases
- generate builders for rust structs
- named function arguments in rust
- avoid positional parameter mistakes in rust apis
- partial application with optional parameters
- builder pattern without boilerplate
- no_std builder generation

## When to choose
- you want compile-time-checked builders with zero boilerplate
- you need named or optional parameters for functions and methods
- you need no_std compatibility
- you want good IDE experience with macro-generated signatures

## When to avoid
- you prefer plain struct update syntax or manual constructors
- your project avoids proc macros or has an old rustc below the MSRV
- you need runtime-configurable builders rather than compile-time generation

## Facets
- artifact type: library
- maturity: stable
- function: developer-tools
- domain: developer-tools, programming-languages
- platform: rust, cross-platform
- tags: builder-pattern, derive-macro, named-arguments, compile-time-checked, no-std, setters, code-generation

## Member repositories
- elastio/bon (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:16.489119+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:52:53.807804+00:00, confidence not recorded.
  - readme: https://github.com/elastio/bon (fetched 2026-08-28T04:06:16.489119+00:00, sha 3a21c9e4c40c)
  - homepage: https://bon-rs.com (fetched 2026-08-29T10:32:58.377422+00:00, sha 56cae5175c2a)
  - registry_crates: https://crates.io/api/v1/crates/bon (fetched 2026-08-29T10:32:58.390679+00:00, sha caebdc30b387)
  - site_page: https://bon-rs.com/changelog (fetched 2026-08-29T10:32:58.386720+00:00, sha ab2e9aee6128)
- Data as of 2026-08-30T08:39:29.467469+00:00.
