Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

rust-cli/config-rs

Repository files navigation

RustBuild StatusCrates.ioDocs.rs

Layered configuration system for Rust applications (with strong support for12-factor applications).

  • Set defaults
  • Set explicit values (to programmatically override)
  • Read fromJSON,TOML,YAML,INI,RON,JSON5 files
  • Read from environment
  • Loosely typed — Configuration values may be read in any supported type, as long as there exists a reasonable conversion
  • Access nested fields using a formatted path — Uses a subset of JSONPath; currently supports the child (redis.port ) and subscript operators (databases[0].name )

Please note that this library can not be used to write changed configurationvalues back to the configuration file(s)!

Usage

Feature flags

  • ini - Adds support for reading INI files
  • json - Adds support for reading JSON files
  • yaml - Adds support for reading YAML files
  • toml - Adds support for reading TOML files
  • ron - Adds support for reading RON files
  • json5 - Adds support for reading JSON5 files

Support for custom formats

Library provides out of the box support for most renowned data formats such as JSON or Yaml. Nonetheless, it contains an extensibility point - aFormat trait that, once implemented, allows seamless integration with library's APIs using custom, less popular or proprietary data formats.

Seecustom_file_format example for more information.

More

See thedocumentation orexamples formore usage information.

License

Licensed under either of

at your option.

About

⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Contributors78

Languages


[8]ページ先頭

©2009-2025 Movatter.jp