irx-config

The library provides convenient way to represent/parse configuration from different sources. The main goals is to be very easy to use and to be extendable

BSD-2-CLAUSE License

Downloads
41.9K
Stars
5
Committers
1

Bot releases are hidden (Show)

irx-config - 3.4.0 Latest Release

Published by abakay 10 months ago

Changes:

  • Switch from BLAKE2b to BLAKE3 hash.
  • Upgrade clap dependency to the next minor version 4.4.x.
  • Upgrade toml dependency to the next minor version 0.8.x.
irx-config - 3.3.0

Published by abakay over 1 year ago

Changes:

  • Set Rust version to 1.65.0 in Cargo.toml file.
  • Improved error reporting.
irx-config - 3.2.0

Published by abakay over 1 year ago

Changes:

  • Set Rust version to 1.64.0 in Cargo.toml file.
  • Fixed compilation/clippy warnings for Rust 1.67.0.
  • Upgrade clap dependency to the next minor version 4.1.x.
  • Upgrade toml dependency to the next minor version 0.7.x.
  • Minor code improvements.
irx-config - 3.1.1

Published by abakay almost 2 years ago

Changes:

  • Fixed compilation/clippy warnings for Rust 1.66.0.
  • Upgrade derive_builder dependency to the next minor version 0.12.x.
  • Minor code improvements.
irx-config - 3.1.0

Published by abakay about 2 years ago

Changes:

  • Fixed issue with default values for clap command-line parameters.
  • Added a new setting use_defaults to cmd parser. Use defaults from clap arguments. Default is false.
    IMPORTANT: Once that setting will be set to true then all defined command-line parameters will have values which will override values with same key(s) from parsers which was added to ConfigBuilder after this parser.
irx-config - 3.0.0

Published by abakay about 2 years ago

Changes:

  • Upgrade clap dependency to the next major version 4.0.x.
  • Remove single_flags_as_bool setting from cmd parser. That functionality should be achieved via clap::ArgAction.
  • The default value of use_arg_types settings was changed to true.
irx-config - 2.4.0

Published by abakay about 2 years ago

Changes:

  • Upgrade clap dependency to the next minor version 3.2.x.
  • Upgrade serde_yaml dependency to the next minor version 0.9.x.
  • Upgrade derive_builder dependency to the next minor version 0.11.x.
  • Added a new setting use_arg_types to cmd parser. If that setting is set to true then use ArgAction or ValueParser type to calculate type of an argument. Default is false.
irx-config - 2.3.2

Published by abakay about 2 years ago

Fixed issue for use_value_delimiter with single value in cmd parser.

irx-config - 2.3.1

Published by abakay about 2 years ago

Fixed implicit conversion of crate::Error to anyhow::Error.

irx-config - 2.3.0

Published by abakay about 2 years ago

Enhancements:

  • Added a new setting single_flags_as_bool to cmd parser. If that setting is set to true and a parameter not allowed to have multiple occurrences by clap API then parameter's value will have boolean true as a value. By default all command-line parameters without values will have they values set to number of they occurrences.
  • Added a new setting ignore_missing_file to file based parsers. If that setting is set to true then a file does not exists, do not try to load it. The default Value will be returned. Default is false.
irx-config - 2.2.0

Published by abakay over 2 years ago

Added JSON5 parser via json5-parser feature.

irx-config - 2.1.0

Published by abakay over 2 years ago

Upgrade clap dependency to the next minor version 3.1.x.

irx-config - 2.0.0

Published by abakay over 2 years ago

NOTE: The clap was upgraded to next major version 3.x. Some old API was deprecated (clap::load_yaml!, etc.). These changes also forced an increase in the major version for this crate.

  • Upgrade clap dependency to the next major version 3.x.
  • The following methods was removed from cmd::ParserBuilder:
    • default(), replaced by new(...)
    • matches(...)
    • arg_names(...)
    • try_arg_names_from_yaml(...)
irx-config - 1.0.2

Published by abakay almost 3 years ago

  • Fixed compilation warnings for Rust 1.57.0.
  • Minor code improvements.
irx-config - 1.0.1

Published by abakay almost 3 years ago

Generate documentation on docs.rs for all features.

irx-config - 1.0.0

Published by abakay almost 3 years ago

The irx-config library provides convenient way to represent/parse configuration from different sources. The main
goals is to be very easy to use and to be extendable.

Features

  • Fully compatible with serde
  • Full deep merge of nested dictionaries/mappings
  • Case sensitive/insensitive parameters names matching/merging
  • Sealing secrets during display/debugging
  • Get all configuration parameters or just cherry pick few
  • Several embedded parsers available via library features:
    • Command-line argument (via clap)
    • Environment variables
    • File based parsers: JSON, YAML and TOML
  • Could be extended with custom parsers