1 unstable release
0.1.0 | Feb 22, 2025 |
---|
#112 in #atomic
44KB
267 lines
conspiracy
Safe, efficient configuration abstractions.
See docs.rs for full details.
License
This project is licensed under either of
at your option.
The SPDX license identifier for this project is MIT OR Apache-2.0
.
lib.rs
:
Conspiracy is an opinionated, extensible configuration crate that applies the "rust ethos" to configuration. It shifts as much validation to compile time as possible, ensures state changes are consistent, and guarantees constructed states are valid through:
- Static typing
- Atomic updates
- Facilities for composition (depending on only a sub-config without resorting to dynamic typing)
- Abstractions for high-performance, lock-free updates
Concepts, Usage, and Examples
See the module documentation for each concept:
- Configuration:
config
- Feature Control:
feature_control
Future Work
Planned features:
- Attributes for
config_struct
to:- Marking config fields as reboot required, automatically call custom reboot definition on change.
- Define custom default values or rely on the type's default impl.
- Define a conversion to use (e.g. original
u32
->Duration
).
- A universal configuration fetcher implementation for dynamic configuration supporting
- Layers
- Serde inputs
- Dynamic evaluation of configuration based on environment context with "Flighting" DSL.
- Enable universal feature tracker to track against a config input, enabling dynamic values + reboot required support.
Dependencies
~1–1.5MB
~29K SLoC