14 releases (1 stable)
| 5.1.0 | Oct 9, 2025 |
|---|---|
| 1.0.0-rc.5 | Feb 9, 2024 |
| 0.8.1 | Jan 29, 2021 |
| 0.2.7 | Oct 12, 2020 |
| 0.0.5 | Sep 2, 2019 |
#2 in #digital-assets
241 downloads per month
Used in 23 crates
(12 directly)
150KB
2.5K
SLoC
Tari Common
This crate provides commonly-used features that are shared across multiple Tari domain layers. Since they may refer to
domain-level concepts, it's inappropriate to place them inside the infrastructure folder, tari-utilities
specifically.
lib.rs:
Common logging and configuration utilities
The global Tari configuration file
A single configuration file (usually ~/.tari/config.toml is used to manage settings for all Tari applications
and nodes running on a single system, whether it's a base node, validator node, or wallet.
Setting of configuration parameters is applied using the following order of precedence:
- Command-line argument
- Environment variable
config.tomlfile value (see details: [configuration])- Configuration default
The utilities exposed in this crate are opinionated, but flexible. In general, all data is stored in a .tari
folder under your home folder.
Custom application configuration
Tari configuration file allows adding custom application specific sections. Tari is using [config] crate
to load configurations and gives access to config::Config struct so that apps might be flexible.
Though as tari apps follow certain configurability assumptions, tari_common provides helper traits
which automate those with minimal code.
CLI helpers
Bootstrapping tari configuration files might be customized via CLI or env settings. To help with building tari-enabled CLI from scratch as easy as possible this crate exposes [ConfigBootstrap] struct which implements structopt::StructOpt trait and can be easily reused in any CLI.
Dependencies
~12–28MB
~401K SLoC