2026-08-28 21:45:40 +07:00
|
|
|
[package]
|
2026-08-28 22:24:14 +07:00
|
|
|
name = "mytheclipse-config"
|
2026-08-29 17:34:26 +00:00
|
|
|
version = "1.21.1"
|
2026-08-28 21:45:40 +07:00
|
|
|
edition = "2021"
|
|
|
|
|
rust-version = "1.75"
|
|
|
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
|
repository = "https://github.com/asepharyana/mytheclipse"
|
|
|
|
|
homepage = "https://github.com/asepharyana/mytheclipse"
|
2026-08-28 22:24:14 +07:00
|
|
|
documentation = "https://docs.rs/mytheclipse-config"
|
2026-08-28 21:45:40 +07:00
|
|
|
authors = ["asepharyana <superaseph@gmail.com>"]
|
|
|
|
|
description = "Type-safe, dynamic configuration engine: load .env/YAML/JSON/TOML into typed structs with hot-reload and validation."
|
|
|
|
|
readme = "README.md"
|
|
|
|
|
keywords = ["config", "env", "yaml", "json", "hot-reload"]
|
|
|
|
|
categories = ["config", "development-tools"]
|
|
|
|
|
|
|
|
|
|
[features]
|
2026-08-29 17:34:30 +07:00
|
|
|
default = ["env", "yaml", "toml", "hot-reload", "validation"]
|
2026-08-28 21:45:40 +07:00
|
|
|
# Load .env files + environment variables.
|
|
|
|
|
env = ["dep:dotenvy"]
|
|
|
|
|
# Parse structured files. JSON support (`.json`) is always available since
|
|
|
|
|
# `serde_json::Value` is also the loader's internal merge representation.
|
|
|
|
|
yaml = ["dep:serde_yaml"]
|
|
|
|
|
toml = ["dep:toml"]
|
|
|
|
|
# Watch config files and hot-reload.
|
|
|
|
|
hot-reload = ["dep:notify", "dep:tokio"]
|
2026-08-29 17:34:30 +07:00
|
|
|
# Config validation traits and built-in validators.
|
|
|
|
|
validation = []
|
2026-08-29 16:04:50 +07:00
|
|
|
# JSON Schema generation for config validation and docs.
|
|
|
|
|
schema = []
|
2026-08-28 21:45:40 +07:00
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
serde = { version = "1", features = ["derive"] }
|
|
|
|
|
serde_json = "1"
|
|
|
|
|
tracing = "0.1"
|
|
|
|
|
|
|
|
|
|
# Optional loaders
|
|
|
|
|
dotenvy = { version = "0.15", optional = true }
|
|
|
|
|
serde_yaml = { version = "0.9", optional = true }
|
|
|
|
|
toml = { version = "0.8", optional = true }
|
|
|
|
|
# Hot-reload file watching
|
|
|
|
|
notify = { version = "6", optional = true }
|
|
|
|
|
tokio = { version = "1.53", features = ["sync", "rt", "time"], optional = true }
|
|
|
|
|
|
|
|
|
|
[dev-dependencies]
|
|
|
|
|
tokio = { version = "1.53", features = ["full"] }
|
|
|
|
|
tempfile = "3"
|