What do you use to parse config files in #rust ? #asknostr
Discussion
DeSerialize toml into hashmap
But I'm a noob don't listen
I'm a rust noob coming from c++. I know nothing from this ecosystem. Just struggling to stay relevant 🤣
Serde deserialize for the win, either as a hashmap as nostr:npub1utx00neqgqln72j22kej3ux7803c2k986henvvha4thuwfkper4s7r50e8 said or into a struct is possible.
the config crate is the go-to for robust multilayered application configuration. supports all the different file formats you might want along with defaults, config merging, and environment variables configuration as well.
depending on what you're building, you may also wanna check this out for multiplatform config directory location handling. https://crates.io/crates/dirs
Is that XDG-like support?
serde