tokio_console/lib.rs
1// this file is here to make a binary target so that cargo metadata works with this crate
2#![doc = include_str!("../README.md")]
3
4/// # Configuration Reference
5///
6/// `tokio-console`'s behavior can be configured in two ways: via command-line
7/// arguments, or using a [TOML] config file.
8///
9/// ## Command-Line Arguments
10///
11/// The following is the complete list of command-line arguments accepted by
12/// `tokio-console`:
13///
14/// ```text
15#[doc = include_str!("../tests/cli-ui.stdout")]
16/// ```
17///
18/// This text can also be displayed by running `tokio-console help`.
19///
20///
21/// ## Configuration File
22///
23/// In addition to command-line arguments, the console can also be configured by a
24/// [TOML] configuration file. All settings that can be configured by the
25/// command line (with the exception of the target address to connect to) can
26/// also be set by the config file.
27///
28/// The `tokio-console gen-config` subcommand generates a config file based on
29/// the default configuration, overridden by any command-line arguments passed
30/// by the user.
31///
32/// ### Examples
33///
34/// The default configuration:
35///
36/// ```toml
37#[doc = include_str!("../console.example.toml")]
38/// ```
39///
40/// ### Config File Locations
41///
42/// Configuration files are read from two locations:
43///
44/// 1. A `tokio-console` directory in the system default configuration
45/// directory (as determined by the [`dirs` crate]). This directory depends
46/// on the operating system:
47///
48/// |Platform | Value |
49/// | ------- | ----------------------------------------------------------------- |
50/// | Linux | `$XDG_CONFIG_HOME/tokio-console` or `$HOME/.config/tokio-console` |
51/// | macOS | `$HOME/Library/Application Support/tokio-console` |
52/// | Windows | `{FOLDERID_RoamingAppData}\tokio-console` |
53///
54/// 2. The current working directory.
55///
56/// If both the current working directory *and* the system default config directory
57/// contain a `console.toml` file, any values set in the current working directory
58/// will override those set in the system config directory. This allows overriding
59/// the user-level default configuration with project specific configurations. Some
60/// projects may wish to check project-specific configurations into source control
61/// so that they may be shared by multiple developers.
62///
63/// Any command-line arguments will override the configuration set in both config files.
64///
65/// [TOML]: https://github.com/toml-lang/toml
66/// [`dirs` crate]: https://docs.rs/dirs/4.0.0/dirs/fn.config_dir.html
67pub mod config_reference {
68 // empty module, used only for documentation
69}