feat(config): add config-rs settings support
Introduce config-rs and Serde support with a nested Settings model. Add config and serde dependencies with toml feature for file-based configuration loading. The Settings struct provides typed configuration with sensible defaults for network, output, observability, and advanced settings sections. Environment variable override via SQMA__ prefix is supported. The legacy Config remains in use; migration follows later.
This commit is contained in:
4 files changed
+327
No files matched your search
@@ -26,6 +26,8 @@ rustix = { version = "1.1", features = ["fs", "system", "thread", "time"] }
|
||||
thiserror = "2.0"
|
||||
libc = "0.2"
|
||||
flume = { version = "0.12.0", default-features = false, features = ["eventual-fairness", "select"] }
|
||||
config = { version = "0.15.25", default-features = false }
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
|
||||
[dependencies.log]
|
||||
features = ["std"]
|
||||
@@ -37,4 +39,6 @@ netlink-socket2 = { version = "0.3.3" }
|
||||
rust-uci = { git = "https://github.com/namib-project/rust-uci.git", rev = "3e7b6153b6df92b45428c32bb6461756563deecb", optional = true }
|
||||
|
||||
[features]
|
||||
default = ["toml"]
|
||||
toml = ["config/toml"]
|
||||
uci = ["dep:rust-uci"]
|
||||
Reference in new issue
Block a user