former 2.45.0

A flexible implementation of the Builder pattern supporting nested builders and collection-specific subformers. Simplify the construction of complex objects.
Documentation
[package]
name = "former"
version = "2.45.0"
edition = "2021"
authors = [
  "Kostiantyn Mysnyk <wandalen@obox.systems>",
  "Dmytro Kryvoruchko <dmytro.kr@obox.systems>",
]
license = "MIT"
readme = "readme.md"
documentation = "https://docs.rs/former"
repository = "https://github.com/Wandalen/wTools/tree/master/module/core/former"
homepage = "https://github.com/Wandalen/wTools/tree/master/module/core/former"
description = """
A flexible implementation of the Builder pattern supporting nested builders and collection-specific subformers. Simplify the construction of complex objects.
"""
categories = [ "algorithms", "development-tools" ]
keywords = [ "fundamental", "general-purpose", "builder-pattern" ]
dependencies = {}
dev-dependencies = {}
build-dependencies = {}

[lints]
workspace = true

[package.metadata.docs.rs]
features = [ "full" ]
all-features = false

[features]

no_std = [ "former_types/no_std", "collection_tools/no_std" ]
use_alloc = [ "no_std", "former_types/use_alloc", "collection_tools/use_alloc" ]

# no_std = [ "collection_tools/no_std" ]
# use_alloc = [ "no_std", "collection_tools/use_alloc" ]

default = [
  "enabled",
  "derive_former",
  # "derive_components",
  # "derive_component_from",
  # "derive_component_assign",
  # "derive_components_assign",
  # "derive_from_components",
  "types_former",
  # "types_component_assign",
]
full = [
  "default",
  "performance",
]

# Performance optimization features
performance = ["former_meta/performance", "dep:benchkit"]
benchmarks = ["performance", "dep:benchkit"]
enabled = [ "former_meta/enabled", "former_types/enabled" ]

derive_former = [ "former_meta/derive_former", "types_former" ]
# derive_components = [ "former_meta/derive_components", "derive_component_assign", "derive_components_assign", "derive_component_from", "derive_from_components" ]
# derive_component_assign = [ "former_meta/derive_component_assign", "types_component_assign" ]
# derive_components_assign = [ "derive_component_assign", "former_meta/derive_components_assign" ]
# derive_component_from = [ "former_meta/derive_component_from" ]
# derive_from_components = [ "former_meta/derive_from_components" ]

types_former = [ "former_types/types_former" ]
# types_component_assign = [ "former_types/types_component_assign" ]

# Debug and diagnostics features
former_diagnostics_print_generated = [ "former_meta/former_diagnostics_print_generated" ]

[dependencies]
former_meta = { workspace = true } # Debug features disabled to prevent compile-time output
former_types = { workspace = true }
collection_tools = { workspace = true, features = [ "collection_constructors" ] }
benchkit = { workspace = true, optional = true, features = [ "enabled", "markdown_reports", "data_generators" ] }

[dev-dependencies]
test_tools = { workspace = true, features = [ "full" ] }
collection_tools = { workspace = true, features = [ "collection_constructors" ] }

[[bench]]
name = "former_optimization_benchmark"
path = "benches/former_optimization_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "macro_expansion_benchmark"
path = "benches/macro_expansion_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "builder_runtime_benchmark"
path = "benches/builder_runtime_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "real_memory_benchmark"
path = "benches/real_memory_benchmark.rs"
required-features = ["benchmarks"]
harness = false

# xxx: Temporarily disabled due to Former macro formatting issues
# [[bench]]
# name = "real_builder_benchmark"
# path = "benches/real_builder_benchmark.rs"
# required-features = ["benchmarks"]
# harness = false

[[bench]]
name = "baseline_macro_performance"
path = "benches/baseline_macro_performance.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "real_baseline_measurement"
path = "benches/real_baseline_measurement.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "simple_baseline_benchmark"
path = "benches/simple_baseline_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "practical_baseline"
path = "benches/practical_baseline.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "post_optimization_measurement"
path = "benches/post_optimization_measurement.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "advanced_optimization_round"
path = "benches/advanced_optimization_round.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "quote_consolidation_benchmark"
path = "benches/quote_consolidation_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "optimization_comparison_benchmark"
path = "benches/optimization_comparison_benchmark.rs"
required-features = ["benchmarks"]
harness = false

[[bench]]
name = "radical_ast_free_benchmark"
path = "benches/radical_ast_free_benchmark.rs"
required-features = ["benchmarks"]
harness = false