How do you manage configuration in rust?

83 points pesanec

Hello, I have been doing some CLI utilities lately and those need configuration. So far I have used clap for command line arguments but I haven´t seen something as dominant with configuration files.

I have tried dotenv but it felt underwhelming. I would like configuration files to work similar to clap -
I make a struct which defines what variables do I want and when the program starts, it parses the config file into the struct and I can work with its instance.

Is there such crate that is mature and stable?