# config-rs

> Layered configuration for Rust applications, from files, the environment and defaults

Source: https://talira.ai/catalog/config-rs-r86z45tq
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / configuration](https://talira.ai/categories/libraries/configuration), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1][^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (MIT OR Apache-2.0).
- Free tier: yes[^1]
- Backed by: [Rust CLI Working Group](https://talira.ai/orgs/rust-cli-wg.md)

config-rs (the config crate) is a layered configuration system for Rust applications, with strong support for 12-factor apps. You set defaults, layer files in JSON, TOML, YAML, INI, RON, JSON5 or Corn and environment variables on top, override values in code, and read the result in any type there's a reasonable conversion to. Nested fields are reached with a path (redis.port, databases[0].name), each file format is a Cargo feature, and a Format trait adds custom formats. It reads configuration only: it can't write changed values back to files.

## Links

- GitHub: https://github.com/rust-cli/config-rs
- Docs: https://docs.rs/config

## Problems it solves

- load settings from a TOML file and override them with environment variables in Rust
- merge default, file and environment configuration for a 12-factor Rust service
- read nested configuration values by path in a Rust app

## Features

- layered defaults, files, environment variables and overrides
- JSON, TOML, YAML, INI, RON, JSON5 and Corn files, each behind a Cargo feature
- loosely typed reads with conversions
- nested field paths such as databases[0].name
- Format trait for custom formats

## Limitations

- It can't write changed configuration values back to the configuration files.[^1]

## Trust

Overall: 0.63 out of 1.
Signals: maintenance 0.93, adoption 0.70, momentum 0.44, community 0.79, backing 0.30, extensibility 0.00.

- last commit 10 days ago
- 49 commits in the last 90 days
- 3.2k GitHub stars
- 96 contributors
- backed by Rust CLI Working Group

## Sources

[^1]: https://github.com/rust-cli/config-rs/blob/main/README.md (checked 29 Nov 2026)
[^2]: https://github.com/rust-cli/config-rs/blob/main/Cargo.toml (checked 29 Nov 2026)
