Skip to content

Releases: x52dev/confik

confik: v0.15.11

01 Apr 03:15
18d860d

Choose a tag to compare

  • Add a new helper MergingUnsetBuilder and trait MergingWithUnset, for aiding in building of custom Configuration implementations. See the docs on MergingWithUnset for a worked example.
  • Fix serde_json::Value merge when the first parsed config doesn't have any value set.

confik: v0.15.9

26 Mar 11:33
aa47aa1

Choose a tag to compare

  • No significant changes since 0.15.8.

confik: v0.15.10

26 Mar 13:16
9efca48

Choose a tag to compare

  • Add #[confik(struct_default)] for struct fields: when no configuration data is present for that field, its value is taken from the same-named field on <Self as Default>::default(). Can be combined with #[confik(skip)] (in place of an explicit #[confik(default)]). Cannot be combined with #[confik(default)] on the same field, and is not supported on enum variant fields (the configuration type must remain a struct).
  • Fix #[confik(default = ...)] with from / try_from: when no data is merged, the default expression is evaluated as the target field type (after the macro’s Into::into), matching the struct_default missing-data path, instead of being forced to unify with the intermediate builder type.
    • Note although this was likely what your code was assuming (and was only working due to the implied Into), this may break existing code.

confik: v0.15.8

25 Mar 13:46
afbecc5

Choose a tag to compare

  • No significant changes since 0.15.7.

confik: v0.15.7

25 Mar 13:06
c4b25a5

Choose a tag to compare

  • No significant changes since 0.15.6.

confik: v0.15.6

25 Mar 12:42
ebb0d28

Choose a tag to compare

  • Implement Configuration for jiff types under the jiff-0_2 feature flag:
  • Add serde(with = ...) modules under confik::jiff for Option<T> fields requiring non-default serialization formats:
    • confik::jiff::timestamp::{second, millisecond, microsecond, nanosecond}::optional — integer epoch timestamps
    • confik::jiff::duration::friendly::compact::optional — friendly compact format for Option<SignedDuration>
    • confik::jiff::span::friendly::compact::optional — friendly compact format for Option<Span>
    • confik::jiff::unsigned_duration::optional and confik::jiff::unsigned_duration::friendly::compact::optional — ISO 8601 and friendly compact format for Option<std::time::Duration>

confik: v0.15.5

25 Mar 12:32
e2a336e

Choose a tag to compare

  • Add RON source support behind new crate feature ron-0_12 (off-by-default).
  • Add YAML source support behind new crate feature yaml_serde-0_10 (off-by-default).

confik: v0.15.4

24 Mar 10:23
061764b

Choose a tag to compare

  • Add serde(with = ...) module confik::humantime under the humantime feature flag, for humantime support via serde_humantime for the builder of Option<Duration>. E.g.
    #[derive(Debug, PartialEq, Eq, Configuration)]
    struct Config {
        #[confik(forward(serde(with = "confik::humantime::option")))]
        timeout: Option<Duration>,
    }

confik: v0.15.3

12 Mar 12:46
a3a7f08

Choose a tag to compare

  • Implement Configuration for serde_json::Value
    • This is a very simple way to implement try_from, see the foreign_type_via_value for an example.

confik: v0.15.2

09 Mar 20:12
2e8cc5d

Choose a tag to compare

  • Add hot-reloadable configuration support with ReloadableConfig trait and ReloadingConfig wrapper. Requires the reloading feature (depends on arc-swap).
    • ReloadableConfig trait defines how to build a configuration instance.
    • ReloadingConfig<T, F> provides lock-free atomic configuration swapping.
    • Optional callbacks via with_on_update() for reload notifications.
    • Optional SIGHUP signal handler via spawn_signal_handler() (requires signal feature, depends on signal-hook).
    • Optional tracing support for logging reload errors (requires tracing feature).
  • Update toml dependency to 1. This means config files now support the TOML v1.1 spec with some new features.
  • Fix try_from failure error, path now includes the (previously missing) failed field's name.
  • Minimum supported Rust version (MSRV) is now 1.81.