Re-thinking: Support deserializing key-value config data
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.2k
- Forks
- 265
- Avg merge
- 2h 42m
- Merged PRs (30d)
- 4
Description
config-rs should be able to support key-value configuration data of the following types:
- Bool
- Integer
- Float
- String
- List of "value"
- Key-Value Mapping of "String" to "Value"
Something like
#[derive(serde::Deserialize)]
enum Value {
Bool(bool),
Int(i64),
Float(f64),
Text(String),
List(Vec<Value>),
Map(HashMap<String, Value>),
}
Should be the basis of all operations. This data format can be deserialized from different sources and be used for the "layering" functionality later.
It might be even possible to implement in a non-owning way.
We should keep the currently supported formats as supported formats in the future.
That entails:
- Toml
- Json
- INI
- Yaml
- Ron
- Json5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing config-rs's current deserialization paths for TOML, JSON, INI, YAML, RON, and JSON5, then examine how configuration layering is expected to use their data. Done means the proposed key-value data model supports Bool, Integer, Float, String, List, and Map values while all currently supported formats remain supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100