[package]
name = "derive_tools"
version = "0.67.0"
edition = "2021"
authors = [
  "Kostiantyn Mysnyk <wandalen@obox.systems>",
  "Dmytro Kryvoruchko <dmytro.kr@obox.systems>",
]
license = "MIT"
readme = "readme.md"
documentation = "https://docs.rs/derive_tools"
repository = "https://github.com/Wandalen/wTools/tree/master/module/core/derive_tools"
homepage = "https://github.com/Wandalen/wTools/tree/master/module/core/derive_tools"
description = """
A collection of derive macros designed to enhance STD.
"""
categories = [ "algorithms", "development-tools" ]
keywords = [ "fundamental", "general-purpose" ]


[lints]
workspace = true


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



[features]

default = [
  "enabled",
  "derive_variadic_from",
  "type_variadic_from",

  "derive_add_assign",
  "derive_add",
  "derive_as_mut",
  "derive_as_ref",
  "derive_constructor",
  "derive_deref",
  "derive_deref_mut",
  "derive_error",

  "derive_index",
  "derive_index_mut",
  # "derive_inner_from",
  "derive_into_iterator",
  # "derive_iterator",
  "derive_mul_assign",
  "derive_mul",
  "derive_not",
  "derive_sum",
  "derive_try_into",
  "derive_is_variant",
  "derive_unwrap",
  # "derive_convert_case",
  "derive_into",

  "derive_display",
  "derive_from_str",

  "derive_clone_dyn",
  # "derive_clone_dyn_use_std",

  "derive_strum",
  "strum_phf",

  "derive_from",
  # "derive_inner_from",
  # "derive_new",

  "derive_phantom",

  # "use_std",
]

full = [
  "enabled",
  "derive_variadic_from",
  "type_variadic_from",

  "derive_add_assign",
  "derive_add",
  "derive_as_mut",
  "derive_as_ref",
  "derive_constructor",
  "derive_deref",
  "derive_deref_mut",
  "derive_error",

  "derive_index",
  "derive_index_mut",
  # "derive_inner_from",
  "derive_into_iterator",
  # "derive_iterator",
  "derive_mul_assign",
  "derive_mul",
  "derive_not",
  "derive_sum",
  "derive_try_into",
  "derive_is_variant",
  "derive_unwrap",
  # "derive_convert_case",
  "derive_into",

  "derive_display",
  "derive_from_str",

  "derive_clone_dyn",
  # "derive_clone_dyn_use_std",

  "derive_strum",
  "strum_phf",

  "derive_from",
  # "derive_inner_from",
  # "derive_new",

  "derive_phantom",

  # "use_std",
]
no_std = []
use_alloc = [ "no_std" ]
enabled = [ "derive_tools_meta/enabled" ]

# nightly = [ "derive_more/nightly" ]

type_variadic_from = [ "variadic_from/enabled", "variadic_from/type_variadic_from" ]
derive_variadic_from = [ "type_variadic_from", "derive_tools_meta/derive_variadic_from", "variadic_from/derive_variadic_from" ]

# enable_track_caller = [ "derive_more", "derive_more/track-caller" ]

derive_add_assign = [ "derive_more", "derive_more/std", "derive_more/add_assign" ]
derive_add = [ "derive_more", "derive_more/std", "derive_more/add" ]
derive_as_mut = [ "derive_tools_meta/derive_as_mut" ]
derive_as_ref = [ "derive_tools_meta/derive_as_ref" ]
# derive_as_mut = [ "derive_more", "derive_more/as_mut" ]
# derive_as_ref = [ "derive_more", "derive_more/as_ref" ]
derive_constructor = [ "derive_more", "derive_more/std", "derive_more/constructor" ]
derive_deref = [ "derive_tools_meta/derive_deref" ]
derive_deref_mut = [ "derive_tools_meta/derive_deref_mut" ]
# derive_deref = [ "derive_more", "derive_more/deref" ]
# derive_deref_mut = [ "derive_more", "derive_more/deref_mut" ]
derive_error = [ "derive_more", "derive_more/std", "derive_more/error" ]
# derive_from = [ "derive_more", "derive_more/from" ]
# derive_from = [ "derive_tools_meta/derive_from" ]
# derive_reflect = [ "derive_tools_meta/derive_reflect" ]

# derive_index = [ "derive_more", "derive_more/std", "derive_more/index" ]
# derive_index_mut = [ "derive_more", "derive_more/std", "derive_more/index_mut" ]
# derive_inner_from = [ "derive_more", "derive_more/into" ]
derive_into_iterator = [ "derive_more", "derive_more/std", "derive_more/into_iterator" ]
# derive_iterator = [ "derive_more", "derive_more/iterator" ]
derive_into = [ "derive_more", "derive_more/into" ]
derive_mul_assign = [ "derive_more", "derive_more/std", "derive_more/mul_assign" ]
derive_mul = [ "derive_more", "derive_more/std", "derive_more/mul" ]
derive_sum = [ "derive_more", "derive_more/std", "derive_more/sum" ]
derive_try_into = [ "derive_more", "derive_more/std", "derive_more/try_into" ]
derive_is_variant = [ "derive_more", "derive_more/is_variant" ]
derive_unwrap = [ "derive_more", "derive_more/std", "derive_more/unwrap" ]
# derive_convert_case = [ "derive_more", "derive_more/convert_case" ]

derive_display = [ "parse-display" ]
derive_from_str = [ "parse-display", "parse-display/std", "parse-display/regex" ]
# derive_from_str = [ "parse-display", "parse-display/std", "parse-display/regex", "parse-display/once_cell" ]

derive_strum = [ "strum/std", "strum/derive", "strum/strum_macros" ]
strum_phf = [ "strum/std", "strum/phf", "strum/strum_macros" ]
# zzz : qqq : review features

derive_clone_dyn = [ "clone_dyn/enabled" ]
# derive_clone_dyn_use_std = [ "derive_clone_dyn", "clone_dyn/use_std" ]
# derive_clone_dyn_no_std = [ "derive_clone_dyn", "clone_dyn/no_std" ]
# derive_clone_dyn_use_alloc = [ "derive_clone_dyn", "clone_dyn/use_alloc" ]

derive_from = [ "derive_tools_meta/derive_from" ]
derive_index = [ "derive_tools_meta/derive_index" ]
derive_index_mut = [ "derive_tools_meta/derive_index_mut" ]
derive_inner_from = [ "derive_tools_meta/derive_inner_from" ]
derive_new = [ "derive_tools_meta/derive_new" ]

derive_not = [ "derive_tools_meta/derive_not" ]

derive_phantom = [ "derive_tools_meta/derive_phantom" ]

parse_display = [ "parse-display" ]

# test_tools passthrough features for cfg validation (Rust 1.80+ check-cfg)
# These features are used by test_tools macros (a_id!, etc.) in cfg predicates.
# They must be declared here so cfg checks pass, even if not explicitly enabled.
diagnostics_runtime_assertions = []
diagnostics_compiletime_assertions = []
diagnostics_memory_layout = []


[dependencies]

## external
derive_more = { version = "~1.0.0-beta.6", optional = true, default-features = false }
strum = { version = "~0.25", optional = true, default-features = false }
# strum_macros = { version = "~0.25.3", optional = true, default-features = false }
parse-display = { version = "~0.8.2", optional = true, default-features = false }


## internal
derive_tools_meta = { workspace = true, optional = true, features = [] }
variadic_from = { workspace = true, optional = true, features = [] }
clone_dyn = { workspace = true, optional = true, features = [ "clone_dyn_types", "derive_clone_dyn" ] }


[dev-dependencies]

derive_tools_meta = { workspace = true, features = ["enabled"] }
macro_tools = { workspace = true, features = ["enabled", "diag", "attr"] }
test_tools = { workspace = true, features = [ "full", "standalone_build" ] }

[build-dependencies]
cfg_aliases = { workspace = true }
