Confy

screenshot of Confy

Confy

🛋 Zero-boilerplate configuration management in Rust

Overview:

Confy is a zero-boilerplate configuration management library that aims to simplify the process of storing and managing configuration data. Instead of worrying about how or where to store the data, Confy allows users to focus on storing the right information. It supports multiple file formats, including TOML, YAML, and RON, and provides features for adding context to error messages.

Features:

  • Zero-boilerplate configuration management: Confy simplifies the process of storing and managing configuration data.
  • Support for multiple file formats: Confy can be used with TOML, YAML, or RON files. TOML is the default language, but the other formats can be enabled using feature flags.
  • Feature flags for enabling optional formats: Only one of the optional formats can be used at a time, and the default format needs to be disabled in order to enable the optional formats.
  • Support for YAML files: To use YAML files with Confy, enable the "yaml_conf" feature and disable both "toml_conf" and "ron_conf" in the Cargo.toml file.
  • Support for RON files: To use RON files with Confy, enable the "ron_conf" feature and disable both "toml_conf" and "yaml_conf" in the Cargo.toml file.
  • Changing error messages: Confy provides information about adding context to error messages, helping users with troubleshooting and debugging.
  • Breaking changes: Confy version 0.5.0 introduced breaking changes, including the addition of optional parameters for the "load" and "store" functions to support multiple configurations. The default configuration file is now named "default-config" instead of using the application's name. Additionally, Confy now supports saving the configuration as TOML or YAML.
  • Storage location changes: Starting with version 0.4.0, the configuration files are stored in the expected place for the user's system. Before version 0.4.0, the configuration file was written in the current directory.

Installation:

To install Confy, follow these steps:

  1. Open your Cargo.toml file.
  2. Add the following line to your dependencies:
    confy = "x.x.x"
    
    Replace "x.x.x" with the latest version of Confy.
  3. Save the Cargo.toml file.
  4. Run the following command to update your dependencies:
    cargo update
    
  5. You can now use Confy in your project by importing it in your code.

Summary:

Confy is a zero-boilerplate configuration management library that simplifies the process of storing and managing configuration data. It supports multiple file formats, including TOML, YAML, and RON, and provides features for adding context to error messages. Confy also offers easy installation through Cargo.toml and provides breaking changes and storage location updates in recent versions. This makes Confy a useful tool for developers looking to streamline their configuration management process.