A library for handling node configuration

7 releases

new 0.2.0-rc3 Nov 26, 2023
0.2.0-rc2 Nov 12, 2023
0.0.5 Sep 13, 2023
0.0.4 Aug 8, 2023
0.0.3 Jul 27, 2023

#262 in Configuration

Download history 1869/week @ 2023-08-08 1641/week @ 2023-08-15 3417/week @ 2023-08-22 3980/week @ 2023-08-29 3099/week @ 2023-09-05 3912/week @ 2023-09-12 2494/week @ 2023-09-19 3114/week @ 2023-09-26 3401/week @ 2023-10-03 2863/week @ 2023-10-10 3079/week @ 2023-10-17 4150/week @ 2023-10-24 6322/week @ 2023-10-31 11261/week @ 2023-11-07 8896/week @ 2023-11-14 6049/week @ 2023-11-21

33,154 downloads per month
Used in 2 crates (via papyrus_storage)

Custom license




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.


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


~187K SLoC