cargo_options/
lib.rs

1mod build;
2mod check;
3mod clippy;
4mod common;
5mod doc;
6mod install;
7mod metadata;
8mod run;
9mod rustc;
10mod test;
11
12pub mod heading {
13    pub const PACKAGE_SELECTION: &str = "Package Selection";
14    pub const TARGET_SELECTION: &str = "Target Selection";
15    pub const FEATURE_SELECTION: &str = "Feature Selection";
16    pub const COMPILATION_OPTIONS: &str = "Compilation Options";
17    pub const MANIFEST_OPTIONS: &str = "Manifest Options";
18}
19
20pub fn styles() -> clap::builder::Styles {
21    use anstyle::{AnsiColor, Effects};
22
23    clap::builder::styling::Styles::styled()
24        .header(AnsiColor::Green.on_default().effects(Effects::BOLD))
25        .usage(AnsiColor::Green.on_default().effects(Effects::BOLD))
26        .literal(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
27        .placeholder(AnsiColor::Cyan.on_default())
28        .error(AnsiColor::Red.on_default().effects(Effects::BOLD))
29        .valid(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
30        .invalid(AnsiColor::Yellow.on_default().effects(Effects::BOLD))
31}
32
33// Specify crate to satisfy naming overlap w/ rustc clippy
34pub use crate::clippy::Clippy;
35pub use build::Build;
36pub use check::Check;
37pub use common::CommonOptions;
38pub use doc::Doc;
39pub use install::Install;
40pub use metadata::Metadata;
41pub use run::Run;
42pub use rustc::Rustc;
43pub use test::Test;