21 unstable releases (3 breaking)

new 0.4.0-dev.2 Apr 17, 2024
0.4.0-dev.0 Jan 8, 2024
0.2.2 Dec 19, 2023
0.2.0-rc3 Nov 26, 2023
0.0.3 Jul 27, 2023

#1750 in Magic Beans

Download history 3072/week @ 2023-12-23 3215/week @ 2023-12-30 2963/week @ 2024-01-06 3593/week @ 2024-01-13 4134/week @ 2024-01-20 3868/week @ 2024-01-27 5006/week @ 2024-02-03 4741/week @ 2024-02-10 4222/week @ 2024-02-17 3368/week @ 2024-02-24 3622/week @ 2024-03-02 4072/week @ 2024-03-09 4312/week @ 2024-03-16 4149/week @ 2024-03-23 3345/week @ 2024-03-30 5867/week @ 2024-04-06

17,793 downloads per month
Used in 2 crates (via papyrus_storage)

Custom license

60KB
1K SLoC

papyrus-config

Description

papyrus-config is a flexible and powerful layered configuration system designed specifically for Papyrus, a Starknet node. This system allows you to easily manage configurations for your Papyrus node by leveraging various sources and providing additional helpful features.

Configuration sources

Supports multiple configuration sources in ascending order of overriding priority:

  • Default values
  • Configuration files (from first to last)
  • Environment variables
  • Command-line arguments

Additional features

  • Support for Nested Configuration Components: Organize your configurations into nested components, making it easy to manage complex settings for different aspects of the application.

  • Usage of Pointers: Use pointers to merge parameters that are common to multiple components. This capability helps in streamlining configurations and avoiding duplication of settings.

  • Automatically-Generated Command Line Parser: To simplify the process of handling command-line arguments, the system automatically generates a command-line parser. This means you don't have to write complex argument parsing code; it's ready to use out-of-the-box.

  • Automatically-Generated Reference Configuration File: Makes it easier for users by generating a reference configuration file. This file serves as a template that highlights all available configuration options and their default values, enabling users to customize their configurations efficiently.

Documentation

Developer reference documentation is available at https://docs.rs/papyrus_config/. The documentation on this site is updated periodically.

To view the most up-to-date documentation, enter the following command at the root directory of the papyrus project:

cargo doc --open -p papyrus_config

Dependencies

~5.5–8MB
~173K SLoC