feat(uci): derive UCI schema from settings
Add uci-derive proc-macro crate with UciConfig and UciSection derive macros that generate UCI schema metadata from Settings structs. The schema maps UCI section types and option names to config-rs field paths. UciSource::from_schema() creates a source from the derived schema, mapping known UCI options to their Settings fields while preserving unknown options under raw UCI-derived paths.
This commit is contained in:
7 files changed
+468
-9
No files matched your search
@@ -29,6 +29,7 @@ flume = { version = "0.12.0", default-features = false, features = ["eventual-f
|
||||
config = { version = "0.15.25", default-features = false }
|
||||
csv = "1.4.0"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
uci-derive = { path = "crates/uci-derive" }
|
||||
|
||||
[dependencies.log]
|
||||
features = ["std"]
|
||||
@@ -46,3 +47,7 @@ default = ["toml", "uci-vendored"]
|
||||
toml = ["config/toml"]
|
||||
uci = ["dep:rust-uci"]
|
||||
uci-vendored = ["uci", "rust-uci/vendored"]
|
||||
|
||||
[workspace]
|
||||
members = ["crates/uci-derive"]
|
||||
resolver = "3"
|
||||
Reference in new issue
Block a user